:root {
  --ink: #27342f;
  --muted: #6e776f;
  --cream: #f7f1e7;
  --paper: #fffdf8;
  --sage: #788f78;
  --sage-dark: #516752;
  --sage-pale: #e3ebdf;
  --terracotta: #c96f4f;
  --terracotta-pale: #f3ded4;
  --sun: #eab65d;
  --line: rgba(52, 70, 62, 0.13);
  --shadow: 0 20px 50px rgba(55, 61, 48, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(234, 182, 93, 0.12) 0 5%, transparent 5.2%),
    radial-gradient(circle at 92% 16%, rgba(120, 143, 120, 0.11) 0 6%, transparent 6.2%),
    var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.page-shell {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 330px;
  padding: 58px 28px 44px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 9px;
  color: var(--terracotta);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span { margin-right: 7px; }

h1, h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 0.98;
}

h1 {
  max-width: 570px;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  letter-spacing: -0.055em;
}

h1 span { color: var(--terracotta); }

.hero-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.dog-portraits {
  display: flex;
  align-items: flex-end;
  min-width: 310px;
  padding-left: 30px;
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border: 7px solid var(--paper);
  border-radius: 50%;
  background: #bd8e62;
  box-shadow: var(--shadow);
  transform: rotate(-5deg);
}

.portrait-charlie {
  width: 148px;
  height: 148px;
  margin-left: -30px;
  background: #777362;
  transform: translateY(34px) rotate(7deg);
}

.dog-face {
  position: relative;
  width: 82%;
  height: 82%;
  border-radius: 43% 43% 48% 48%;
  background: inherit;
  z-index: 2;
}

.ear {
  position: absolute;
  top: 28px;
  width: 58px;
  height: 90px;
  border-radius: 70% 35% 65% 45%;
  background: #6d4b38;
}

.portrait-charlie .ear { background: #44483f; }
.ear-left { left: -8px; transform: rotate(23deg); }
.ear-right { right: -8px; transform: rotate(-23deg) scaleX(-1); }

.eye {
  position: absolute;
  top: 47px;
  width: 10px;
  height: 12px;
  border-radius: 50%;
  background: #252a26;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.45);
}

.eye-left { left: 34px; }
.eye-right { right: 34px; }

.snout {
  position: absolute;
  left: 50%;
  top: 69px;
  width: 66px;
  height: 48px;
  border-radius: 50%;
  background: #d9b38e;
  transform: translateX(-50%);
}

.portrait-charlie .snout { background: #a7a18c; }

.snout::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 22px;
  height: 14px;
  border-radius: 50% 50% 55% 55%;
  background: #30322e;
  transform: translateX(-50%);
}

.snout i {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 26px;
  height: 14px;
  border-bottom: 2px solid #30322e;
  border-radius: 50%;
  transform: translateX(-50%);
}

.portrait-name {
  position: absolute;
  right: -9px;
  bottom: -11px;
  z-index: 4;
  padding: 6px 14px;
  border-radius: 99px;
  color: var(--paper);
  background: var(--sage-dark);
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.92rem;
  transform: rotate(5deg);
}

.portrait-charlie .portrait-name {
  right: auto;
  left: -5px;
  background: var(--terracotta);
  transform: rotate(-7deg);
}

main { display: grid; gap: 28px; }

.today-card,
.food-card,
.how-to {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.91);
  box-shadow: var(--shadow);
}

.food-card {
  background: #f1e0cf;
}

.bowl-icon {
  position: relative;
  width: 68px;
  height: 46px;
  border-bottom: 28px solid var(--terracotta);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-radius: 0 0 23px 23px;
}

.bowl-icon::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -9px;
  width: 68px;
  height: 10px;
  border-radius: 50%;
  background: #d68a68;
}

.bowl-icon span,
.bowl-icon span::before,
.bowl-icon span::after {
  position: absolute;
  z-index: 1;
  width: 11px;
  height: 8px;
  border-radius: 50%;
  background: #765a3d;
}

.bowl-icon span { top: 7px; left: 10px; transform: rotate(16deg); }
.bowl-icon span::before { content: ""; top: 1px; left: 18px; }
.bowl-icon span::after { content: ""; top: 0; left: 36px; transform: rotate(-25deg); }

.meal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.meal-block {
  padding: 25px;
  border-radius: 20px;
  background: rgba(255, 253, 248, .62);
}

.meal-block.night-meal { background: rgba(81, 103, 82, .10); }

.meal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(77, 65, 49, .12);
}

.meal-title > div { display: flex; flex-direction: column; }
.meal-title strong { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; }
.meal-title div span { color: var(--muted); font-size: .76rem; }
.food-card .night-meal .moon::after { background: #e1d6c7; }

.meal-check {
  display: grid;
  grid-template-columns: 27px minmax(70px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  cursor: pointer;
}

.meal-check + .meal-check { border-top: 1px solid rgba(77, 65, 49, .10); }

.meal-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.meal-check input:focus-visible + .custom-check { outline: 3px solid rgba(201,111,79,.3); outline-offset: 3px; }
.meal-check input:checked + .custom-check { border-color: var(--sage); background: var(--sage); }
.meal-check input:checked + .custom-check::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.meal-check input:checked ~ .meal-dog,
.meal-check input:checked ~ .portion { opacity: .5; text-decoration: line-through; }

.meal-dog { font-weight: 700; transition: .2s ease; }
.portion { color: var(--sage-dark); text-align: right; transition: .2s ease; }
.portion b { font-family: "Fraunces", Georgia, serif; font-size: 1.45rem; }
.portion small { display: block; color: var(--muted); font-size: .64rem; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 32px;
}

.section-heading.compact { margin-bottom: 25px; }

h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.035em;
}

.progress-wrap {
  width: 190px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.progress-track {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sage-pale);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transition: width .35s ease;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.schedule-block {
  padding: 28px;
  border-radius: 22px;
  background: #f8f3e8;
}

.schedule-block.evening { background: #edf0e7; }

.time-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

.time-heading p {
  margin: 0 0 2px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.time-heading div > span { color: var(--muted); font-size: .8rem; }

.time-icon {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.sun {
  border: 8px dotted rgba(234, 182, 93, .75);
  border-radius: 50%;
  background: var(--sun);
}

.moon {
  border-radius: 50%;
  background: var(--sage-dark);
}

.moon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 11px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edf0e7;
}

.dose-check {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  cursor: pointer;
  user-select: none;
}

.dose-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.custom-check {
  position: relative;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border: 2px solid #b4baad;
  border-radius: 8px;
  background: var(--paper);
  transition: .2s ease;
}

.dose-check input:focus-visible + .custom-check { outline: 3px solid rgba(201,111,79,.3); outline-offset: 3px; }

.dose-check input:checked + .custom-check {
  border-color: var(--sage);
  background: var(--sage);
}

.dose-check input:checked + .custom-check::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dose-check input:checked ~ .dose-copy { opacity: .55; text-decoration: line-through; }

.dose-copy { display: flex; flex-direction: column; line-height: 1.25; transition: .2s ease; }
.dose-copy strong { font-size: 1.05rem; }
.dose-copy span { color: var(--muted); font-size: .8rem; }

.pill-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0 40px;
  padding: 0;
  list-style: none;
}

.pill-list li {
  display: flex;
  align-items: center;
  color: #39473f;
  font-size: .89rem;
}

.pill-list em {
  margin-left: auto;
  color: var(--muted);
  font-size: .72rem;
  font-style: normal;
}

.pill {
  display: inline-block;
  width: 17px;
  height: 9px;
  margin-right: 9px;
  border: 1px solid rgba(38,47,42,.18);
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 2px 3px rgba(0,0,0,.08);
  transform: rotate(-24deg);
}

.pill-brown { background: #986742; border-color: #7a5034; }
.pill-small { width: 11px; height: 7px; }

.charlie-dose {
  margin-top: 21px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rest-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  padding: 15px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}

.rest-note > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: var(--sage);
  font-size: .8rem;
}

.rest-note p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.rest-note strong { color: var(--ink); }

.complete-message {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--sage-dark);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: .35s ease;
}

.complete-message.visible { max-height: 60px; margin-top: 24px; opacity: 1; }
.complete-message span { color: var(--terracotta); }

.how-to {
  position: relative;
  overflow: hidden;
  background: var(--sage-dark);
  color: var(--paper);
}

.how-to::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -135px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 68px rgba(255,255,255,.02);
}

.how-to .section-kicker { color: #f0b499; }

.pb-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 64px;
  border: 3px solid #e4a962;
  border-radius: 10px 10px 17px 17px;
  color: #5d3d27;
  background: #c8894f;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  transform: rotate(5deg);
}

.pb-badge::before {
  content: "";
  position: absolute;
  top: -8px;
  width: 52px;
  height: 10px;
  border-radius: 5px;
  background: #e6d3b8;
}

.steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  min-height: 180px;
  padding: 23px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}

.step-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 25px;
  border-radius: 50%;
  color: var(--sage-dark);
  background: #f0b499;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}

.steps strong { font-family: "Fraunces", Georgia, serif; font-size: 1.08rem; }
.steps p { margin: 7px 0 0; color: rgba(255,255,255,.68); font-size: .84rem; line-height: 1.55; }

.tip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  color: #513f31;
  background: #f0d7b6;
}

.tip > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  color: white;
  background: var(--terracotta);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}

.tip p { margin: 0; font-size: .82rem; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 38px 0 46px;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}

.paw { position: relative; color: var(--terracotta); font-size: .62rem; }
.paw::before, .paw::after { content: "•"; position: absolute; top: -6px; font-size: .45rem; }
.paw::before { left: -3px; }
.paw::after { right: -3px; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 22px, 620px); }
  .hero { min-height: 295px; padding: 44px 10px 36px; }
  .dog-portraits { min-width: 205px; padding-left: 5px; transform: scale(.8); transform-origin: right center; }
  .portrait { width: 145px; height: 145px; }
  .portrait-charlie { width: 125px; height: 125px; }
  .eye { top: 38px; }
  .eye-left { left: 27px; }
  .eye-right { right: 27px; }
  .snout { top: 57px; }
  .schedule-grid, .meal-grid, .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; display: flex; gap: 16px; }
  .step-number { flex: 0 0 31px; margin-bottom: 0; }
}

@media (max-width: 560px) {
  .hero { display: block; min-height: 0; padding: 42px 9px 30px; overflow: hidden; }
  h1 { font-size: clamp(3.55rem, 19vw, 5rem); }
  .dog-portraits { justify-content: flex-end; height: 137px; margin: 13px 2px 0 auto; transform: scale(.68); }
  .today-card, .food-card, .how-to { padding: 24px 18px; border-radius: 23px; }
  .section-heading { align-items: flex-start; gap: 18px; }
  .progress-wrap { width: 105px; padding-top: 2px; }
  .schedule-block { padding: 22px 19px; }
  .pill-list { margin-left: 39px; }
  .pill-list em { font-size: .68rem; }
  footer p { max-width: 230px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
