:root {
  --paper: #f7f1e8;
  --paper-deep: #ede1d2;
  --ink: #302a27;
  --ink-soft: #6e625b;
  --coral: #c65f4c;
  --coral-deep: #a94737;
  --coral-soft: #f2d1c8;
  --sage: #718574;
  --sage-soft: #dce6dc;
  --white: #fffdf9;
  --line: rgba(74, 57, 49, 0.14);
  --shadow: 0 24px 70px rgba(81, 55, 43, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(239, 196, 177, 0.36), transparent 32rem),
    radial-gradient(circle at 90% 66%, rgba(179, 199, 181, 0.3), transparent 30rem),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(198, 95, 76, 0.34);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

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

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 0 clamp(1.25rem, 5vw, 5.5rem);
}

.glow {
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
}

.glow-one {
  top: 12rem;
  left: -11rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(198, 95, 76, 0.12);
}

.glow-two {
  right: -9rem;
  bottom: 5rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(113, 133, 116, 0.16);
}

.site-header,
.hero,
.records-section,
footer {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.header-note svg {
  width: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.account-button {
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  color: var(--coral-deep);
  background: rgba(255, 253, 249, 0.64);
  border: 1px solid rgba(169, 71, 55, 0.28);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 750;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.account-button:hover {
  transform: translateY(-1px);
  background: var(--white);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 0.76fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 690px;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.intro {
  max-width: 40rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.4rem;
  color: var(--coral-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-icon {
  display: inline-flex;
  width: 1.5rem;
}

.eyebrow-icon svg {
  width: 100%;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 6vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 35rem;
  margin: 1.75rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.7;
}

.today-label {
  display: inline-block;
  margin: 2rem 0 0;
  padding-top: 0.75rem;
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.checkin-card {
  position: relative;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2.1rem, 5vw, 3.4rem);
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 253, 249, 0.93)),
    var(--white);
  border: 1px solid rgba(99, 74, 61, 0.12);
  border-radius: 2rem;
  box-shadow: var(--shadow);
}

.checkin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: inherit;
}

.welcome-art {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  flex: 0 0 auto;
  margin: 0 0 1.6rem;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid rgba(70, 50, 42, 0.1);
  border-radius: 1.35rem;
  box-shadow: 0 16px 38px rgba(73, 49, 40, 0.11);
}

.welcome-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.checkin-card:has(#account-error-state:not([hidden])) .heart-orbit,
.checkin-card:has(#account-error-state:not([hidden])) .welcome-art,
.checkin-card:has(#setup-state:not([hidden])) .heart-orbit,
.checkin-card:has(#tracker-state:not([hidden])) .welcome-art {
  display: none;
}

.heart-orbit,
.account-error-state,
.setup-state,
.tracker-state,
.confirmation {
  position: relative;
  z-index: 1;
}

.account-error-state,
.setup-state {
  width: 100%;
}

.account-error-state .button {
  margin-top: 1.25rem;
}

.checkin-card:has(#setup-state:not([hidden])) {
  justify-content: flex-start;
}

.checkin-card:has(#setup-state:not([hidden])) .welcome-art {
  aspect-ratio: 2.25 / 1;
  margin-bottom: 1.35rem;
}

.sample-record {
  width: 100%;
  max-width: 26rem;
  margin: 1.25rem auto 0;
  padding: 0.95rem;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 250, 244, 0.95), rgba(239, 235, 223, 0.82));
  border: 1px solid rgba(70, 50, 42, 0.09);
  border-radius: 1.15rem;
  box-shadow: 0 10px 26px rgba(73, 49, 40, 0.06);
}

.sample-record-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.sample-record-heading div {
  display: grid;
  gap: 0.12rem;
}

.sample-record-heading span {
  color: var(--coral-deep);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sample-record-heading strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.sample-record-heading > p {
  margin: 0 !important;
  color: var(--ink) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
}

.sample-weekdays,
.sample-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.22rem;
}

.sample-weekdays {
  margin: 0.8rem 0 0.3rem;
  color: var(--ink-soft);
  font-size: 0.5rem;
  font-weight: 750;
  text-align: center;
}

.sample-days > span,
.sample-days > i {
  min-width: 0;
  min-height: 2rem;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0.22rem;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.62);
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 0.55rem;
  font-size: 0.62rem;
  font-style: normal;
}

.sample-days > i {
  background: transparent;
  border-color: transparent;
}

.sample-days .is-held {
  background: linear-gradient(145deg, rgba(221, 234, 222, 0.98), rgba(241, 231, 219, 0.9));
  border-color: rgba(103, 127, 106, 0.25);
}

.sample-days .is-selected {
  box-shadow: inset 0 0 0 1px rgba(143, 64, 52, 0.42);
}

.sample-days b {
  color: #748c78;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.5rem;
  line-height: 1;
}

.sample-day-detail {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.7rem;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 250, 244, 0.82);
  border-radius: 0.7rem;
}

.sample-day-detail span {
  color: var(--ink);
  font-size: 0.64rem;
  font-weight: 750;
}

.sample-day-detail p {
  margin: 0 !important;
  color: var(--ink-soft) !important;
  font-size: 0.66rem;
  line-height: 1.4 !important;
}

.welcome-steps {
  max-width: 26rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.8rem auto 0;
}

.welcome-steps span {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  padding: 0.55rem 0.35rem;
  color: var(--ink-soft);
  background: rgba(243, 237, 228, 0.52);
  border-radius: 0.7rem;
  font-size: 0.57rem;
  line-height: 1.3;
}

.welcome-steps b {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  color: var(--white);
  background: var(--sage);
  border-radius: 50%;
  font-size: 0.55rem;
}

.welcome-reassurance {
  max-width: 26rem;
  margin: 0.8rem auto 0;
  padding: 0.8rem 0.9rem;
  text-align: left;
  background: rgba(219, 229, 218, 0.42);
  border: 1px solid rgba(103, 127, 106, 0.15);
  border-radius: 0.85rem;
}

.checkin-card .welcome-reassurance p {
  margin: 0 !important;
  font-size: 0.76rem;
  line-height: 1.55;
}

.checkin-card .welcome-reassurance p + p {
  margin-top: 0.55rem !important;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(103, 127, 106, 0.13);
}

.welcome-reassurance a {
  color: var(--coral-deep);
  font-weight: 750;
}

.welcome-actions {
  display: grid;
  justify-items: center;
  margin-top: 1rem;
}

.welcome-actions .text-button {
  margin-top: 0.65rem;
}

.setup-back {
  margin-top: 1rem;
}

.heart-orbit {
  display: grid;
  width: 7.25rem;
  height: 7.25rem;
  place-items: center;
  margin: 0 auto 1.4rem;
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(198, 95, 76, 0.13);
  border-radius: 50%;
}

.orbit-one {
  transform: rotate(14deg) scaleX(0.84);
}

.orbit-two {
  transform: rotate(-18deg) scaleY(0.8);
}

.main-heart {
  display: grid;
  width: 4.55rem;
  height: 4.55rem;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 48% 52% 54% 46% / 55% 46% 54% 45%;
  animation: breathe 4.2s ease-in-out infinite;
}

.main-heart svg {
  width: 1.85rem;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1) rotate(-3deg);
  }
  50% {
    transform: scale(1.055) rotate(2deg);
  }
}

.checkin-card h2,
.records-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.checkin-card h2 {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
}

.checkin-card p:not(.card-kicker):not(.confirmation) {
  max-width: 27rem;
  margin: 0.7rem auto 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.card-kicker,
.section-kicker,
.summary-eyebrow {
  margin: 0 0 0.7rem;
  color: var(--coral-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.name-form {
  width: 100%;
  max-width: 25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  margin: 1.7rem auto 0;
}

.name-form input {
  min-width: 0;
  min-height: 3.35rem;
  padding: 0.85rem 1rem;
  color: var(--ink);
  background: rgba(247, 241, 232, 0.64);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.name-form input::placeholder {
  color: rgba(110, 98, 91, 0.72);
}

.button {
  min-height: 3.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--coral);
  border: 1px solid var(--coral);
  box-shadow: 0 10px 24px rgba(169, 71, 55, 0.2);
}

.button-primary:hover {
  background: var(--coral-deep);
  box-shadow: 0 13px 28px rgba(169, 71, 55, 0.24);
}

.button-quiet {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
}

.child-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.7rem;
}

.child-hold-button {
  width: 100%;
  min-height: 4.4rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  text-align: left;
  background: rgba(247, 241, 232, 0.62);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.child-hold-button:hover {
  transform: translateY(-2px);
  background: rgba(242, 209, 200, 0.35);
  border-color: rgba(198, 95, 76, 0.32);
}

.child-hold-button.is-held-today {
  background:
    linear-gradient(135deg, rgba(220, 230, 220, 0.72), rgba(247, 241, 232, 0.72));
  border-color: rgba(103, 127, 106, 0.28);
}

.child-hold-button.is-held-today:hover {
  background:
    linear-gradient(135deg, rgba(212, 225, 213, 0.86), rgba(247, 241, 232, 0.8));
  border-color: rgba(103, 127, 106, 0.42);
}

.child-hold-button.is-held-today .child-heart {
  color: #647d67;
  background: rgba(204, 220, 206, 0.78);
}

.child-hold-button.is-held-today .plus-mark {
  background: #708874;
  font-size: 0.92rem;
  font-weight: 700;
}

.child-hold-button.just-recorded {
  animation: remembered 650ms ease;
}

@keyframes remembered {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.025);
    background: rgba(242, 209, 200, 0.75);
  }
  100% {
    transform: scale(1);
  }
}

.child-heart {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 50%;
}

.child-heart svg {
  width: 1.1rem;
}

.child-button-words {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.child-button-words strong {
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-button-words span {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.plus-mark {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  color: var(--white);
  background: var(--coral);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.2rem;
  padding: 0.35rem 0.1rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(110, 98, 91, 0.38);
  cursor: pointer;
  font-size: 0.8rem;
}

.text-button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.add-child-form {
  grid-template-columns: 1fr;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.inline-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.inline-actions .button {
  min-height: 2.9rem;
}

.confirmation {
  min-height: 1.2rem;
  margin: 1rem 0 -1.3rem;
  color: var(--coral-deep);
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 0;
  transition: opacity 160ms ease;
}

.confirmation.is-visible {
  opacity: 1;
}

.memory-panel {
  position: absolute;
  z-index: 3;
  inset: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  text-align: left;
  background: rgba(255, 253, 249, 0.98);
  border: 1px solid rgba(99, 74, 61, 0.12);
  border-radius: 1.4rem;
  box-shadow: 0 20px 55px rgba(81, 55, 43, 0.16);
}

.memory-panel h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.memory-panel > p:not(.card-kicker) {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.memory-panel form {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.memory-panel form > label {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 750;
}

.memory-panel textarea {
  width: 100%;
  min-height: 7.2rem;
  resize: vertical;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: rgba(247, 241, 232, 0.64);
  border: 1px solid var(--line);
  border-radius: 1rem;
  line-height: 1.5;
}

.memory-actions {
  justify-content: flex-start;
  margin-top: 0.15rem;
}

.memory-actions .button {
  min-height: 2.85rem;
}

.records-section {
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: rgba(255, 253, 249, 0.6);
  border: 1px solid var(--line);
  border-radius: 2rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.records-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-note {
  max-width: 19rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: right;
}

.records-empty {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
  padding: 1.25rem;
  color: var(--ink-soft);
  background: rgba(237, 225, 210, 0.42);
  border-radius: 1rem;
}

.records-empty > p {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.5;
}

.records-empty.records-preview {
  display: grid;
  grid-template-columns: minmax(10rem, 0.62fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(237, 225, 210, 0.58), rgba(219, 229, 218, 0.34));
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 1.4rem;
}

.records-preview-copy {
  text-align: left;
}

.records-preview-copy .records-preview-kicker {
  margin: 0 0 0.45rem;
  color: var(--coral-deep);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.records-preview-copy h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.records-preview-copy p:last-child {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.records-preview .sample-record {
  max-width: none;
  margin: 0;
}

.records-companion-art {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  aspect-ratio: 64 / 25;
  margin: 0;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 1.05rem;
}

.records-companion-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 30%;
}

@media (max-width: 700px) {
  .records-empty.records-preview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .records-companion-art {
    aspect-ratio: auto;
    height: 9rem;
  }
}

.empty-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--sage);
  background: var(--sage-soft);
  border-radius: 50%;
}

.empty-mark svg {
  width: 1.2rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.25rem;
}

.summary-card {
  padding: 1.45rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 12px 34px rgba(81, 55, 43, 0.06);
}

.summary-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.summary-eyebrow {
  margin-bottom: 0.3rem;
  font-size: 0.62rem;
}

.summary-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.last-held {
  max-width: 11rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: right;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.stat {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem 0.55rem;
  background: rgba(247, 241, 232, 0.62);
  border-radius: 0.85rem;
}

.stat strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
}

.stat span {
  color: var(--ink-soft);
  font-size: 0.65rem;
  line-height: 1.25;
}

.history-visuals {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.history-figure,
.quilt-figure {
  min-width: 0;
  margin: 0;
  padding: 0.9rem 0.85rem 0.65rem;
  background:
    linear-gradient(180deg, rgba(247, 241, 232, 0.48), rgba(255, 253, 249, 0.7));
  border: 1px solid rgba(74, 57, 49, 0.08);
  border-radius: 0.95rem;
}

.history-heading,
.history-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.history-heading {
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.history-heading span:last-child {
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 500;
}

.history-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.35rem;
  overflow: visible;
}

.chart-guide {
  stroke: rgba(110, 98, 91, 0.18);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart-guide-soft {
  stroke-opacity: 0.55;
}

.chart-line {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(169, 71, 55, 0.12));
}

.chart-point {
  fill: var(--white);
  stroke: var(--coral);
  stroke-width: 2;
}

.chart-point-today {
  fill: var(--coral);
}

.history-axis {
  margin-top: -0.15rem;
  color: var(--ink-soft);
  font-size: 0.6rem;
  font-weight: 600;
}

.year-quilt-grid {
  display: grid;
  grid-template-columns: 2.4rem repeat(12, minmax(0, 1fr));
  gap: clamp(0.16rem, 0.45vw, 0.3rem);
  align-items: center;
  margin-top: 0.9rem;
}

.quilt-corner {
  height: 0.6rem;
}

.quilt-month,
.quilt-year {
  color: var(--ink-soft);
  font-size: 0.55rem;
  font-weight: 650;
  line-height: 1;
}

.quilt-month {
  text-align: center;
}

.quilt-year {
  letter-spacing: -0.02em;
}

.quilt-cell {
  display: block;
  aspect-ratio: 1;
  min-width: 0;
  background: rgba(237, 225, 210, 0.58);
  border: 1px solid rgba(74, 57, 49, 0.05);
  border-radius: 0.28rem;
}

.quilt-level-1 {
  background: #f3d9d2;
}

.quilt-level-2 {
  background: #e9aca0;
}

.quilt-level-3 {
  background: #d77b69;
}

.quilt-level-4 {
  background: var(--coral-deep);
}

.quilt-current {
  outline: 2px solid rgba(169, 71, 55, 0.52);
  outline-offset: 1px;
}

.quilt-future {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(237, 225, 210, 0.34),
      rgba(237, 225, 210, 0.34) 2px,
      rgba(255, 253, 249, 0.4) 2px,
      rgba(255, 253, 249, 0.4) 4px
    );
  border-color: transparent;
}

.quilt-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.54rem;
  font-weight: 600;
}

.quilt-key-swatches {
  display: flex;
  gap: 0.15rem;
}

.quilt-key .quilt-cell {
  width: 0.62rem;
}

.summary-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.year-recap {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  background:
    linear-gradient(120deg, rgba(220, 230, 220, 0.58), rgba(247, 241, 232, 0.52));
  border: 1px solid rgba(113, 133, 116, 0.12);
  border-radius: 0.95rem;
}

.year-recap h4,
.memory-list h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
}

.year-recap p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.55;
}

.memory-list {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
}

.memory-list > h4 {
  margin-bottom: 0.75rem;
}

.memory-item {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--line);
}

.memory-item time {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 700;
}

.memory-item p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.55;
}

.memory-item-content {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.memory-item-words {
  min-width: 0;
  display: grid;
  gap: 0.5rem;
}

.small-action {
  padding: 0.25rem 0;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(110, 98, 91, 0.28);
  cursor: pointer;
  font-size: 0.7rem;
}

.small-action:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.primary-small-action {
  color: var(--coral-deep);
}

.primary-small-action.is-held-today {
  color: #58705d;
  border-color: rgba(88, 112, 93, 0.35);
}

.danger-small-action {
  margin-left: auto;
  color: #8f4f46;
  border-color: rgba(143, 79, 70, 0.28);
}

.danger-small-action:hover {
  color: #71372f;
  border-color: rgba(113, 55, 47, 0.5);
}

.legacy-note {
  margin: 1.3rem 0 0;
  padding: 0.85rem 1rem;
  color: var(--ink-soft);
  background: rgba(220, 230, 220, 0.54);
  border-radius: 0.85rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

.records-caption {
  max-width: 47rem;
  margin: 1.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.6;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding-block: 2.6rem 3rem;
  color: var(--ink-soft);
}

footer svg {
  width: 0.95rem;
}

footer p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-style: italic;
}

.account-dialog {
  width: min(31rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: clamp(1.6rem, 5vw, 2.5rem);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(242, 209, 200, 0.4), transparent 17rem),
    var(--white);
  border: 1px solid rgba(99, 74, 61, 0.14);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
}

.account-dialog::backdrop {
  background: rgba(48, 42, 39, 0.4);
  backdrop-filter: blur(4px);
}

.account-dialog h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.45rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.dialog-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  color: var(--ink-soft);
  background: rgba(247, 241, 232, 0.72);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
}

.dialog-copy {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.87rem;
  line-height: 1.55;
}

.account-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

.account-form label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-form input {
  min-height: 3.15rem;
  margin-bottom: 0.35rem;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  background: rgba(247, 241, 232, 0.64);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.account-form .button {
  margin-top: 0.45rem;
}

.account-message {
  min-height: 1.2rem;
  margin: 0.85rem 0 0;
  color: var(--sage);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.45;
}

.account-message.is-error {
  color: var(--coral-deep);
}

.dialog-mode-button {
  margin-top: 0.5rem;
}

.forgot-password-button {
  display: block;
  margin-top: 0.55rem;
}

.forgot-password-button[hidden] {
  display: none;
}

.privacy-copy {
  margin: 1.35rem 0 0;
  padding-top: 1rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  line-height: 1.5;
}

.account-benefits {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.account-benefits span {
  position: relative;
  padding: 0.7rem 0.8rem 0.7rem 2.25rem;
  color: var(--ink-soft);
  background: rgba(220, 230, 220, 0.5);
  border-radius: 0.8rem;
  font-size: 0.78rem;
}

.account-benefits span::before {
  content: "✓";
  position: absolute;
  left: 0.8rem;
  color: var(--sage);
  font-weight: 800;
}

.sign-out-button {
  width: 100%;
  margin-top: 1.3rem;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    min-height: 0;
    padding-block: 4rem;
  }

  .intro {
    text-align: center;
    margin-inline: auto;
  }

  .eyebrow {
    justify-content: center;
  }

  h1 {
    max-width: 12ch;
  }

  .intro-copy {
    margin-inline: auto;
  }
}

@media (max-width: 680px) {
  .history-visuals {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-inline: 1rem;
  }

  .site-header {
    padding-block: 1.1rem;
  }

  .brand {
    font-size: 1.02rem;
  }

  .header-note {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .hero {
    padding-block: 3.3rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  .checkin-card {
    min-height: 520px;
    padding: 2rem 1.15rem;
    border-radius: 1.55rem;
  }

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

  .name-form .button {
    width: 100%;
  }

  .records-section {
    padding: 2rem 1rem;
    border-radius: 1.55rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .section-note {
    text-align: left;
  }

  .summary-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .year-recap {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .memory-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .last-held {
    max-width: none;
    text-align: left;
  }

  .stat {
    padding-inline: 0.4rem;
  }

  footer {
    align-items: flex-start;
    padding-inline: 0.6rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Keepsake direction */

:root {
  --paper: #f3ede4;
  --paper-deep: #e8dccd;
  --ink: #332925;
  --ink-soft: #74645c;
  --coral: #b85b49;
  --coral-deep: #8f4034;
  --coral-soft: #efd6ce;
  --sage: #6e816f;
  --sage-soft: #dbe5da;
  --white: #fffaf4;
  --line: rgba(70, 50, 42, 0.13);
  --shadow: 0 28px 80px rgba(73, 49, 40, 0.12);
}

body {
  background:
    radial-gradient(circle at 8% 5%, rgba(234, 188, 171, 0.4), transparent 31rem),
    radial-gradient(circle at 96% 48%, rgba(177, 196, 176, 0.3), transparent 33rem),
    linear-gradient(180deg, #f7f1e9 0%, var(--paper) 46%, #eee5da 100%);
}

.app-shell {
  padding-inline: clamp(1rem, 4vw, 4.5rem);
}

.site-header,
.hero,
.records-section,
footer {
  width: min(1180px, 100%);
}

.site-header {
  padding-block: 1.25rem;
  border-bottom-color: rgba(70, 50, 42, 0.1);
}

.brand {
  gap: 0.75rem;
  font-size: 1.22rem;
}

.account-button {
  min-height: 2.7rem;
  padding-inline: 1rem;
  background: rgba(255, 250, 244, 0.66);
  border-color: rgba(143, 64, 52, 0.2);
  box-shadow: 0 7px 20px rgba(73, 49, 40, 0.06);
}

.hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.78fr);
  gap: clamp(3rem, 7vw, 7rem);
  min-height: 640px;
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}

.eyebrow {
  margin-bottom: 1.6rem;
  color: var(--coral-deep);
  letter-spacing: 0.16em;
}

h1 {
  max-width: 8.5ch;
  font-size: clamp(3.8rem, 7vw, 6.7rem);
  letter-spacing: -0.062em;
  line-height: 0.93;
}

.intro-copy {
  max-width: 32rem;
  margin-top: 2rem;
  font-size: clamp(1.03rem, 1.35vw, 1.18rem);
  line-height: 1.75;
}

.today-label {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 250, 244, 0.48);
  border: 1px solid rgba(70, 50, 42, 0.09);
  border-radius: 999px;
}

.checkin-card {
  min-height: 570px;
  padding: clamp(2rem, 5vw, 3.75rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 12%, rgba(239, 214, 206, 0.65), transparent 14rem),
    linear-gradient(150deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 244, 0.96));
  border-color: rgba(88, 61, 49, 0.1);
  border-radius: 2.65rem;
  box-shadow:
    0 35px 95px rgba(73, 49, 40, 0.15),
    0 4px 15px rgba(73, 49, 40, 0.04);
}

.heart-orbit {
  width: 8.15rem;
  height: 8.15rem;
  margin-bottom: 1.6rem;
}

.main-heart {
  width: 5.15rem;
  height: 5.15rem;
  background:
    linear-gradient(145deg, #f3ddd6, #ebcbc1);
  box-shadow: 0 14px 35px rgba(143, 64, 52, 0.13);
}

.checkin-card h2 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
}

.child-profile-form {
  max-width: 30rem;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.profile-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.profile-fields label {
  display: grid;
  gap: 0.38rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.profile-fields label span {
  padding-left: 0.65rem;
}

.profile-fields label em {
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.name-form .profile-fields input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.8rem 1rem;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid rgba(70, 50, 42, 0.12);
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.child-profile-form > .button {
  justify-self: center;
  min-width: 8.5rem;
}

.add-child-form {
  padding-top: 1rem;
}

.button {
  min-height: 3.2rem;
  padding-inline: 1.35rem;
}

.button-primary {
  background:
    linear-gradient(145deg, #c46d5a, var(--coral));
  border-color: var(--coral);
  box-shadow: 0 12px 28px rgba(143, 64, 52, 0.22);
}

.child-actions {
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.child-hold-button {
  min-height: 4.8rem;
  padding: 0.8rem 1rem;
  background: rgba(255, 250, 244, 0.74);
  border-color: rgba(70, 50, 42, 0.1);
  border-radius: 1.3rem;
  box-shadow: 0 10px 28px rgba(73, 49, 40, 0.06);
}

.child-hold-button:hover {
  background: rgba(255, 250, 244, 0.98);
  border-color: rgba(184, 91, 73, 0.22);
  box-shadow: 0 14px 34px rgba(73, 49, 40, 0.09);
}

.child-heart {
  width: 3.05rem;
  height: 3.05rem;
  background: linear-gradient(145deg, #f3ddd6, var(--coral-soft));
}

.plus-mark {
  width: 2rem;
  height: 2rem;
  background: var(--coral);
  box-shadow: 0 6px 15px rgba(143, 64, 52, 0.18);
}

.confirmation {
  min-height: 1.15rem;
  margin: 1.05rem 0 0;
}

.memory-invite {
  position: relative;
  z-index: 2;
  margin-top: 0.6rem;
  padding: 0.25rem 0.1rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(116, 100, 92, 0.32);
  cursor: pointer;
  font-size: 0.74rem;
}

.memory-invite:hover {
  color: var(--coral-deep);
  border-color: rgba(143, 64, 52, 0.42);
}

.memory-panel {
  inset: 0.85rem;
  border-radius: 2rem;
}

.records-section {
  padding: clamp(5rem, 9vw, 8rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.section-heading {
  align-items: center;
  padding-bottom: 1.7rem;
  border-bottom: 1px solid var(--line);
}

.records-section h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.section-note {
  max-width: 22rem;
  font-size: 0.82rem;
}

.summary-grid {
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 1.5rem;
}

.child-record-tabs {
  width: min(100%, 42rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-self: center;
  padding: 0.35rem;
  background: rgba(243, 237, 228, 0.76);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 1.1rem;
}

.child-record-tab {
  min-width: 0;
  min-height: 2.85rem;
  flex: 1 1 9rem;
  padding: 0.65rem 0.75rem;
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.child-record-tab:hover {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.58);
}

.child-record-tab.is-selected {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.94);
  border-color: rgba(103, 127, 106, 0.2);
  box-shadow: 0 5px 16px rgba(73, 49, 40, 0.07);
}

.child-record-tab:focus-visible {
  outline: 3px solid rgba(143, 64, 52, 0.38);
  outline-offset: 2px;
}

.summary-card {
  position: relative;
  padding: clamp(1rem, 3vw, 1.6rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(239, 214, 206, 0.38), transparent 23rem),
    rgba(255, 250, 244, 0.86);
  border-color: rgba(70, 50, 42, 0.1);
  border-radius: 2.1rem;
  box-shadow:
    0 22px 65px rgba(73, 49, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.summary-top {
  align-items: center;
  margin-bottom: 1rem;
}

.child-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.child-portrait {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--coral-deep);
  background:
    linear-gradient(145deg, #f4dfd7, #ebcbc0);
  border: 1px solid rgba(143, 64, 52, 0.08);
  border-radius: 47% 53% 45% 55% / 54% 45% 55% 46%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  box-shadow: 0 10px 28px rgba(143, 64, 52, 0.1);
}

.child-heading-copy {
  min-width: 0;
}

.summary-card h3 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}

.last-held {
  max-width: 17rem;
  padding: 0.5rem 0.72rem;
  background: rgba(219, 229, 218, 0.46);
  border-radius: 999px;
}

.stats-row {
  gap: 0;
  margin-top: 1.7rem;
  padding-block: 1.05rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  position: relative;
  gap: 0.35rem;
  padding: 0.25rem 0.9rem;
  background: transparent;
  border-radius: 0;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat strong {
  font-size: 1.65rem;
}

.history-visuals {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.history-figure,
.quilt-figure {
  padding: 1.05rem;
  background: rgba(243, 237, 228, 0.56);
  border-color: rgba(70, 50, 42, 0.07);
  border-radius: 1.25rem;
}

.rhythm-figure {
  display: flex;
  flex-direction: column;
}

.rhythm-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.28rem;
  align-items: end;
  min-height: 6.2rem;
  margin-top: 0.65rem;
}

.rhythm-day {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.rhythm-mark {
  display: grid;
  width: 100%;
  min-width: 0.65rem;
  aspect-ratio: 0.72;
  place-items: center;
  color: rgba(255, 250, 244, 0.92);
  background: rgba(232, 220, 205, 0.72);
  border-radius: 999px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.42rem, 0.8vw, 0.65rem);
  font-style: normal;
}

.rhythm-day em {
  color: var(--ink-soft);
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 650;
}

.rhythm-level-1 {
  background: #e8b9ae;
}

.rhythm-level-2 {
  background: #d99180;
}

.rhythm-level-3 {
  background: #c66b58;
}

.rhythm-level-4 {
  background: var(--coral-deep);
}

.rhythm-today .rhythm-mark {
  outline: 2px solid rgba(143, 64, 52, 0.35);
  outline-offset: 2px;
}

.record-start-note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.4;
}

.record-start-note > span:first-child {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  background: var(--coral);
  border: 3px solid rgba(255, 250, 244, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(143, 64, 52, 0.32);
}

.year-quilt-scroll {
  overflow-x: auto;
  padding: 0.2rem 0.15rem 0.45rem;
  scrollbar-color: rgba(116, 100, 92, 0.26) transparent;
}

.year-quilt-grid {
  min-width: 31rem;
  gap: clamp(0.18rem, 0.5vw, 0.38rem);
  margin-top: 1rem;
}

.quilt-cell {
  display: grid;
  background: rgba(232, 220, 205, 0.76);
  border-color: transparent;
  border-radius: 50%;
  place-items: center;
  color: var(--ink);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.quilt-level-1 {
  background: #efd3cb;
}

.quilt-level-2 {
  background: #e3aa9d;
}

.quilt-level-3 {
  background: #cb7664;
  color: var(--white);
}

.quilt-level-4 {
  background: var(--coral-deep);
  color: var(--white);
}

.quilt-before-record {
  visibility: hidden;
}

.year-quilt-grid button.quilt-cell {
  appearance: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    outline-color 160ms ease;
}

.year-quilt-grid button.quilt-cell:not(:disabled):hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 5px 12px rgba(73, 49, 40, 0.13);
}

.year-quilt-grid button.quilt-cell:focus-visible {
  outline: 3px solid rgba(143, 64, 52, 0.45);
  outline-offset: 2px;
}

.quilt-future {
  opacity: 0.4;
  background: rgba(232, 220, 205, 0.45);
  border: 1px dashed rgba(116, 100, 92, 0.26);
  cursor: default;
}

.quilt-current {
  outline-color: rgba(143, 64, 52, 0.42);
}

.quilt-record-start {
  box-shadow:
    inset 0 0 0 2px rgba(255, 250, 244, 0.92),
    0 0 0 1px rgba(143, 64, 52, 0.5);
}

.quilt-selected {
  outline: 3px solid rgba(143, 64, 52, 0.5);
  outline-offset: 2px;
}

.month-detail {
  margin-top: 0.9rem;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 250, 244, 0.7);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 0.9rem;
}

.month-detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.month-detail-heading strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-weight: 500;
}

.month-detail-heading span,
.month-detail-empty,
.month-day-list {
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.month-detail-empty {
  margin: 0.4rem 0 0;
}

.month-day-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.month-day-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(70, 50, 42, 0.07);
}

.month-day-list time {
  color: var(--ink);
  font-weight: 650;
}

.history-visuals {
  grid-template-columns: 1fr;
}

.month-calendar {
  min-width: 0;
  padding: clamp(0.9rem, 3vw, 1.4rem);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.74), transparent 15rem),
    linear-gradient(150deg, rgba(255, 250, 244, 0.96), rgba(243, 237, 228, 0.68));
  border: 1px solid rgba(70, 50, 42, 0.1);
  border-radius: 1.55rem;
  box-shadow:
    0 16px 38px rgba(73, 49, 40, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.calendar-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
  text-align: center;
}

.calendar-heading h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 4vw, 1.6rem);
  font-weight: 400;
}

.calendar-heading p {
  margin: 0.22rem 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 650;
}

.calendar-nav {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  padding: 0;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.74);
  border: 1px solid rgba(70, 50, 42, 0.12);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.calendar-nav:not(:disabled):hover {
  transform: translateY(-1px);
  background: rgba(255, 250, 244, 1);
  border-color: rgba(184, 91, 73, 0.32);
}

.calendar-nav:disabled {
  opacity: 0.34;
  cursor: default;
}

.calendar-selected-day {
  display: grid;
  grid-template-columns: minmax(7rem, 0.42fr) minmax(0, 1.58fr);
  gap: 0.8rem 1.2rem;
  align-items: center;
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  background: rgba(255, 250, 244, 0.86);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 1rem;
}

.calendar-selected-day time {
  display: block;
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.calendar-selected-day strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 500;
}

.calendar-selected-day > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.5;
}

.calendar-day-actions {
  grid-column: 2;
  margin-top: -0.2rem;
}

.calendar-detail-action {
  padding: 0.1rem 0;
  color: var(--coral-deep);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(143, 64, 52, 0.28);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 750;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(0.22rem, 0.75vw, 0.48rem);
}

.calendar-weekdays {
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-width: 0;
  min-height: clamp(2.8rem, 7vw, 4rem);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0.4rem;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.7);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 0.85rem;
  cursor: pointer;
  font-size: 0.72rem;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.calendar-day i {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  color: #fffaf4;
  background: #748c78;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.58rem;
  font-style: normal;
  line-height: 1;
}

.calendar-day:not(:disabled):hover {
  transform: translateY(-1px);
  background: rgba(255, 250, 244, 0.96);
  border-color: rgba(184, 91, 73, 0.24);
}

.calendar-remembered {
  background:
    linear-gradient(145deg, rgba(221, 234, 222, 0.98), rgba(241, 231, 219, 0.9));
  border-color: rgba(103, 127, 106, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.calendar-before-record {
  opacity: 0.3;
  background: rgba(232, 220, 205, 0.35);
  border-color: transparent;
}

.calendar-future {
  opacity: 0.42;
  background: transparent;
  border-style: dashed;
}

.calendar-today {
  box-shadow: inset 0 0 0 1px rgba(143, 64, 52, 0.45);
}

.calendar-selected {
  border-color: rgba(143, 64, 52, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(143, 64, 52, 0.4),
    0 5px 14px rgba(73, 49, 40, 0.08);
}

.calendar-spacer {
  min-width: 0;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.05rem;
  color: var(--ink-soft);
  font-size: 0.6rem;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-top: 0.8rem;
}

.calendar-month-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-month-picker {
  min-height: 2.35rem;
  max-width: 8.6rem;
  padding: 0.35rem 0.45rem;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.82);
  border: 1px solid rgba(70, 50, 42, 0.12);
  border-radius: 0.62rem;
  font: inherit;
}

.calendar-record-tools {
  width: fit-content;
  max-width: 100%;
  margin: 0.8rem auto 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.calendar-record-tools > summary {
  width: fit-content;
  margin: 0 auto;
  padding: 0.35rem 0;
  cursor: pointer;
  font-weight: 700;
  list-style-position: outside;
}

.calendar-record-tools[open] {
  width: 100%;
}

.calendar-record-tools[open] > summary {
  color: var(--ink);
}

.calendar-record-tools-body {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.55rem;
  padding: 0.9rem 1rem;
  background: rgba(243, 237, 228, 0.5);
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 1rem;
}

.calendar-record-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.calendar-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.calendar-legend-mark {
  width: 0.8rem;
  height: 0.8rem;
  display: grid;
  place-items: center;
  color: #6f8874;
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid rgba(70, 50, 42, 0.1);
  border-radius: 0.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.48rem;
  font-style: normal;
  line-height: 1;
}

.calendar-legend-mark.is-remembered {
  background: rgba(217, 230, 218, 0.88);
  border-color: rgba(103, 127, 106, 0.2);
}

.calendar-legend-mark.is-before-record {
  opacity: 0.35;
  background: rgba(232, 220, 205, 0.5);
}

.year-overview {
  min-width: 0;
}

.year-overview > summary {
  width: fit-content;
  margin: 0.1rem auto 0;
  padding: 0.35rem 0;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(110, 98, 91, 0.28);
  cursor: pointer;
  font-size: 0.7rem;
  list-style-position: outside;
}

.year-overview[open] > summary {
  margin-bottom: 0.8rem;
  color: var(--ink);
}

.year-overview .quilt-figure {
  margin-top: 0;
}

.year-recap {
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  background:
    linear-gradient(115deg, rgba(219, 229, 218, 0.68), rgba(243, 237, 228, 0.42));
  border: 0;
  border-left: 3px solid rgba(110, 129, 111, 0.45);
  border-radius: 0.4rem 1rem 1rem 0.4rem;
}

.memory-list {
  border-color: rgba(70, 50, 42, 0.09);
  border-radius: 1.2rem;
}

.summary-actions {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-top: 0.4rem;
}

.records-caption {
  margin-top: 2rem;
}

footer {
  padding-block: 2.3rem 3.5rem;
  flex-wrap: wrap;
}

.six-month-story {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 1.65rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(239, 214, 206, 0.42), transparent 18rem),
    linear-gradient(145deg, rgba(255, 250, 244, 0.94), rgba(243, 237, 228, 0.7));
  border: 1px solid rgba(70, 50, 42, 0.09);
  border-radius: 1.5rem;
  box-shadow: 0 14px 38px rgba(73, 49, 40, 0.06);
}

.story-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.story-heading h4 {
  max-width: 19ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.story-toggle {
  flex: 0 0 auto;
  padding: 0.62rem 0.78rem;
  color: var(--coral-deep);
  font-size: 0.62rem;
  font-weight: 750;
  background: rgba(255, 250, 244, 0.8);
  border: 1px solid rgba(143, 64, 52, 0.2);
  border-radius: 999px;
  cursor: pointer;
}

.story-toggle:hover {
  background: var(--white);
  border-color: rgba(143, 64, 52, 0.38);
}

.story-preview {
  height: 3.6rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.32rem;
  align-items: end;
  margin-top: 0.8rem;
}

.story-preview-month {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.22rem;
  align-items: end;
}

.story-preview-month i {
  width: 100%;
  height: var(--preview-height);
  min-height: 0.18rem;
  display: block;
  background: linear-gradient(180deg, #dca092, #bd5f4d);
  border-radius: 0.38rem 0.38rem 0.2rem 0.2rem;
}

.story-preview-month small {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.5rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.story-preview-summary {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.62rem;
  line-height: 1.4;
}

.story-body[hidden] {
  display: none;
}

.story-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.35rem;
  overflow: hidden;
  background: rgba(255, 250, 244, 0.6);
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 1rem;
}

.story-fact {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding: 0.8rem 0.9rem;
}

.story-fact + .story-fact {
  border-left: 1px solid rgba(70, 50, 42, 0.07);
}

.story-fact span {
  color: var(--ink-soft);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-fact strong {
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
}

.chapter-months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.5rem), 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.chapter-month-tab {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 5rem auto auto;
  gap: 0.32rem;
  padding: 0.7rem 0.6rem;
  color: var(--ink-soft);
  text-align: left;
  background: rgba(243, 237, 228, 0.58);
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 0.9rem;
  cursor: pointer;
  transition:
    transform 160ms ease,
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.chapter-month-tab:hover {
  transform: translateY(-2px);
  color: var(--ink);
  background: rgba(255, 250, 244, 0.86);
}

.chapter-month-tab.is-selected {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.96);
  border-color: rgba(143, 64, 52, 0.24);
  box-shadow: 0 8px 22px rgba(73, 49, 40, 0.08);
}

.chapter-month-name {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-bar {
  position: relative;
  display: flex;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(232, 220, 205, 0.3), rgba(232, 220, 205, 0.72));
  border-radius: 0.6rem;
}

.chapter-bar i {
  width: 100%;
  height: var(--chapter-height);
  min-height: 0.3rem;
  display: block;
  background:
    linear-gradient(180deg, #dca092, #bd5f4d);
  border-radius: 0.6rem 0.6rem 0.35rem 0.35rem;
  box-shadow: 0 -4px 14px rgba(143, 64, 52, 0.12);
}

.chapter-month-tab strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-weight: 500;
}

.chapter-month-tab small {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-detail {
  margin-top: 0.75rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  background: rgba(255, 250, 244, 0.82);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 1.15rem;
}

.chapter-detail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.chapter-detail-heading h5 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.chapter-age {
  max-width: 16rem;
  color: var(--ink-soft);
  font-size: 0.62rem;
  line-height: 1.4;
  text-align: right;
}

.chapter-age:empty {
  display: none;
}

.chapter-narrative {
  max-width: 46rem;
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  line-height: 1.6;
}

.chapter-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
  background: rgba(243, 237, 228, 0.48);
  border-radius: 0.85rem;
}

.chapter-highlights {
  margin-top: 1.1rem;
}

.chapter-highlights h6 {
  margin: 0 0 0.25rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-weight: 500;
}

.chapter-highlight {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.85rem;
  padding-block: 0.75rem;
  border-top: 1px solid rgba(70, 50, 42, 0.08);
}

.chapter-highlight time {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 750;
}

.chapter-highlight p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.55;
}

.chapter-more,
.chapter-quiet {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  font-size: 0.64rem;
  line-height: 1.5;
}

.chapter-empty {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.9rem;
  padding: 0.8rem 0.9rem;
  color: var(--ink-soft);
  background: rgba(243, 237, 228, 0.42);
  border-radius: 0.8rem;
}

.chapter-empty span {
  color: var(--sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.chapter-empty p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.45;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 10ch;
  }

}

@media (max-width: 700px) {
  .history-visuals {
    grid-template-columns: 1fr;
  }

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

  .story-fact:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(70, 50, 42, 0.07);
  }

  .story-fact:nth-child(4) {
    border-top: 1px solid rgba(70, 50, 42, 0.07);
  }
}

@media (max-width: 560px) {
  .checkin-card:has(#setup-state:not([hidden])) {
    padding: 1rem 0.8rem 1.25rem;
  }

  .checkin-card:has(#setup-state:not([hidden])) .welcome-art {
    display: none;
  }

  .sample-record {
    padding: 0.7rem;
  }

  .sample-days > span,
  .sample-days > i {
    min-height: 1.8rem;
    padding: 0.15rem;
    border-radius: 0.42rem;
  }

  .sample-day-detail {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .welcome-steps span {
    padding-inline: 0.2rem;
  }

  .child-record-tabs {
    width: 100%;
    flex-wrap: nowrap;
    justify-self: stretch;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .child-record-tab {
    min-width: 6.5rem;
    max-width: 12rem;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .profile-fields {
    grid-template-columns: 1fr;
  }

  .checkin-card {
    min-height: 550px;
    border-radius: 2rem;
  }

  .summary-card {
    padding: 0.8rem;
    border-radius: 1.6rem;
  }

  .six-month-story {
    padding: 0.95rem;
    border-radius: 1.2rem;
  }

  .chapter-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .chapter-age {
    max-width: none;
    text-align: left;
  }

  .story-heading {
    gap: 0.75rem;
  }

  .story-heading h4 {
    font-size: 1.2rem;
  }

  .story-toggle {
    padding: 0.58rem 0.68rem;
    white-space: nowrap;
  }

  .story-preview {
    height: 3.25rem;
  }

  .chapter-months {
    display: flex;
    margin-inline: -0.15rem;
    padding: 0.15rem 0.15rem 0.45rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .chapter-month-tab {
    width: 5.1rem;
    flex: 0 0 5.1rem;
    grid-template-rows: auto 2.7rem auto auto;
    scroll-snap-align: start;
  }

  .story-facts {
    display: flex;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    scrollbar-width: thin;
  }

  .story-fact {
    min-width: 8.6rem;
    flex: 0 0 8.6rem;
    background: rgba(255, 250, 244, 0.6);
    border: 1px solid rgba(70, 50, 42, 0.07);
  }

  .story-fact + .story-fact,
  .story-fact:nth-child(3),
  .story-fact:nth-child(4) {
    border-top: 1px solid rgba(70, 50, 42, 0.07);
    border-left: 0;
  }

  .chapter-facts {
    grid-template-columns: 1fr;
  }

  .chapter-facts .story-fact + .story-fact {
    border-top: 1px solid rgba(70, 50, 42, 0.07);
    border-left: 0;
  }

  .chapter-highlight {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .summary-top {
    align-items: flex-start;
  }

  .child-portrait {
    width: 3rem;
    height: 3rem;
  }

  .last-held {
    max-width: 9.5rem;
    margin-left: 0;
    padding: 0.42rem 0.58rem;
    font-size: 0.64rem;
  }

  .stat {
    padding-inline: 0.45rem;
  }

  .rhythm-grid {
    gap: 0.2rem;
  }

  .month-calendar {
    padding: 0.7rem;
    border-radius: 1.1rem;
  }

  .calendar-selected-day {
    grid-template-columns: 1fr;
  }

  .calendar-day-actions {
    grid-column: 1;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 0.2rem;
  }

  .calendar-day {
    min-height: 2.85rem;
    padding: 0.3rem 0.15rem;
    border-radius: 0.65rem;
  }

  .calendar-weekdays {
    font-size: 0.52rem;
  }

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

  .calendar-record-tool-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-record-tool-actions .small-action {
    width: 100%;
  }

}

/* Launch-readiness pass: a faster daily return, clearer history, and safer controls. */

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  color: var(--white);
  background: var(--ink);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(48, 42, 39, 0.2);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
  transition: transform 160ms ease;
}

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

.memory-panel-inline {
  position: relative;
  inset: auto;
  width: 100%;
  margin-top: 0.75rem;
  padding: clamp(1.15rem, 4vw, 2rem);
  overflow: visible;
  justify-content: flex-start;
  background: rgba(255, 250, 244, 0.92);
  border-radius: 1.35rem;
  box-shadow: none;
}

.checkin-card:has(#memory-panel:not([hidden])) {
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
}

.checkin-card:has(#memory-panel:not([hidden])) > .heart-orbit,
.checkin-card:has(#memory-panel:not([hidden])) > .setup-state,
.checkin-card:has(#memory-panel:not([hidden])) > .tracker-state {
  display: none;
}

.checkin-card:has(#memory-panel:not([hidden])) > .confirmation {
  margin: 0 0 0.4rem;
}

.memory-message,
.history-action-status {
  min-height: 1.2rem;
  margin: 0;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.memory-message.is-error,
.history-action-status.is-error {
  color: var(--coral-deep);
}

.memory-message:empty,
.history-action-status:empty {
  display: none;
}

.history-view-switcher {
  width: min(100%, 32rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 1.5rem auto 0;
  padding: 0.35rem;
  background: rgba(243, 237, 228, 0.78);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 1rem;
}

.history-view-tab {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.7rem;
  overflow: hidden;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-view-tab:hover {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.62);
}

.history-view-tab.is-selected,
.history-view-tab[aria-selected="true"] {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.98);
  border-color: rgba(103, 127, 106, 0.2);
  box-shadow: 0 5px 16px rgba(73, 49, 40, 0.07);
}

.history-view-panel[hidden] {
  display: none !important;
}

.history-view-empty {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  padding: 1rem 1.1rem;
  color: var(--ink-soft);
  background: rgba(243, 237, 228, 0.48);
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 0.9rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: center;
}

.history-action-status {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(219, 229, 218, 0.52);
  border-radius: 0.8rem;
}

.account-dialog {
  overflow-y: auto;
}

.privacy-copy a,
.trust-center a {
  color: var(--coral-deep);
  font-weight: 700;
  text-underline-offset: 0.18rem;
}

.account-data-tools {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.local-record-panel {
  padding: 1rem;
  background: rgba(219, 229, 218, 0.42);
  border: 1px solid rgba(103, 127, 106, 0.18);
  border-radius: 0.95rem;
}

body.is-record-opening .hero,
body.is-record-opening .records-section {
  opacity: 0.58;
  transition: opacity 160ms ease;
}

body.has-record-error #checkin-card .child-hold-button,
body.has-record-error .records-section button:not(#retry-account-load) {
  cursor: not-allowed;
}

.account-data-tools h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.account-data-tools > p:not(.account-message) {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
}

.account-data-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.account-data-actions .button {
  width: 100%;
  text-decoration: none;
}

.reminder-settings {
  padding: 1rem;
  background: rgba(219, 229, 218, 0.34);
  border: 1px solid rgba(103, 127, 106, 0.16);
  border-radius: 0.95rem;
}

.reminder-settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reminder-status {
  flex: 0 0 auto;
  padding: 0.28rem 0.58rem;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.76);
  border: 1px solid rgba(70, 50, 42, 0.09);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.reminder-status.is-on {
  color: #3f6449;
  background: rgba(207, 226, 209, 0.78);
  border-color: rgba(63, 100, 73, 0.15);
}

.reminder-controls {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.reminder-controls > label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reminder-controls select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  background: rgba(255, 250, 244, 0.78);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  font: inherit;
}

.reminder-device-note {
  margin: 0.1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.5;
}

.reminder-name-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.7rem;
  padding: 0.55rem 0.7rem;
  color: var(--ink-soft);
  background: rgba(255, 250, 244, 0.58);
  border: 1px solid rgba(70, 50, 42, 0.07);
  border-radius: 0.75rem;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.reminder-name-option input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--sage);
}

.reminder-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.reminder-actions .button {
  width: 100%;
}

.reminder-message {
  min-height: 0;
  margin-bottom: 0;
}

.account-export-note {
  margin: -0.1rem 0 0.25rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.5;
}

.button-danger {
  color: #71372f;
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid rgba(113, 55, 47, 0.3);
  box-shadow: none;
}

.button-danger:hover {
  color: var(--white);
  background: #88493f;
  border-color: #88493f;
}

.trust-center {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  padding: clamp(1.5rem, 4vw, 2.4rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-heading h2 {
  max-width: 18ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.trust-grid article {
  min-width: 0;
  padding: 1rem;
  background: rgba(255, 250, 244, 0.56);
  border: 1px solid rgba(70, 50, 42, 0.08);
  border-radius: 1rem;
}

.trust-grid article:target {
  outline: 3px solid rgba(143, 64, 52, 0.28);
  outline-offset: 3px;
}

.trust-grid h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.trust-grid p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.6;
}

footer {
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-signature,
.footer-links {
  display: flex;
  align-items: center;
}

.footer-signature {
  gap: 0.55rem;
}

.footer-links {
  gap: 0.4rem;
}

.footer-links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.7rem;
  color: var(--ink-soft);
  border-radius: 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.58);
}

.account-button,
.calendar-nav,
.dialog-close,
.story-toggle {
  min-height: 2.75rem;
}

.calendar-nav,
.dialog-close {
  width: 2.75rem;
  height: 2.75rem;
}

.text-button,
.small-action,
.birth-edit-button,
.calendar-detail-action {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.7rem;
  border-radius: 0.65rem;
  font-size: 0.76rem;
}

.summary-actions .small-action {
  padding-inline: 0.85rem;
  background: rgba(255, 250, 244, 0.58);
  border: 1px solid rgba(70, 50, 42, 0.1);
}

.summary-actions .danger-small-action {
  border-color: rgba(113, 55, 47, 0.24);
}

.history-axis,
.rhythm-day em,
.quilt-month,
.quilt-year,
.calendar-weekdays,
.calendar-legend,
.story-preview-month small,
.story-fact span,
.chapter-month-tab small {
  font-size: 0.7rem;
}

.month-detail-heading span,
.month-detail-empty,
.month-day-list,
.chapter-more,
.chapter-quiet,
.chapter-empty p {
  font-size: 0.72rem;
}

@media (max-width: 880px) {
  .hero:has(#tracker-state:not([hidden])) {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-block: 1.25rem 3.5rem;
  }

  .hero:has(#tracker-state:not([hidden])) .checkin-card {
    order: 1;
    width: 100%;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    padding: clamp(1.15rem, 4vw, 1.65rem);
    text-align: left;
    border-radius: 1.5rem;
  }

  .hero:has(#tracker-state:not([hidden])) .heart-orbit {
    display: none;
  }

  .hero:has(#tracker-state:not([hidden])) .tracker-state {
    width: 100%;
  }

  .hero:has(#tracker-state:not([hidden])) .tracker-copy {
    max-width: 42rem;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .hero:has(#tracker-state:not([hidden])) .child-actions {
    margin-top: 1rem;
  }

  .hero:has(#tracker-state:not([hidden])) .intro {
    order: 2;
    max-width: 42rem;
    margin: 0;
    text-align: left;
  }

  .hero:has(#tracker-state:not([hidden])) .eyebrow {
    justify-content: flex-start;
    margin-bottom: 0.65rem;
  }

  .hero:has(#tracker-state:not([hidden])) h1 {
    max-width: 15ch;
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.02;
  }

  .hero:has(#tracker-state:not([hidden])) .intro-copy {
    margin-top: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .hero:has(#tracker-state:not([hidden])) .today-label {
    display: none;
  }
}

@media (min-width: 600px) and (max-width: 880px) {
  .hero:has(#tracker-state:not([hidden])) .child-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .history-view-switcher {
    width: 100%;
  }

  .history-view-tab {
    padding-inline: 0.35rem;
    font-size: 0.82rem;
  }

  .memory-panel-inline {
    padding: 1rem;
  }

  .memory-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .memory-actions .button {
    width: 100%;
  }

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

  .summary-actions .small-action,
  .summary-actions .danger-small-action {
    width: 100%;
    margin-left: 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .footer-signature {
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

/* Keep the landing image expressive without making the small-screen layout
   inherit the desktop proportions. */
@media (min-width: 881px) {
  .hero:has(#setup-state:not([hidden])) {
    grid-template-columns: minmax(0, 0.86fr) minmax(440px, 0.94fr);
    gap: clamp(2.75rem, 5vw, 5rem);
    align-items: start;
    min-height: 0;
    padding-block: clamp(2.25rem, 4vw, 3.75rem) clamp(3.75rem, 6vw, 5.5rem);
  }

  .hero:has(#setup-state:not([hidden])) .intro {
    padding-top: clamp(1rem, 2.5vw, 2.5rem);
  }

  .hero:has(#setup-state:not([hidden])) .checkin-card {
    --setup-card-pad: clamp(1.75rem, 3vw, 2.6rem);
    min-height: 0;
    padding: 0 var(--setup-card-pad) clamp(2.25rem, 4vw, 3rem);
  }

  .hero:has(#setup-state:not([hidden])) .welcome-art {
    width: calc(100% + var(--setup-card-pad) + var(--setup-card-pad));
    aspect-ratio: 1.91 / 1;
    margin: 0 calc(-1 * var(--setup-card-pad)) 1.8rem;
    border: 0;
    border-radius: 2.65rem 2.65rem 1.35rem 1.35rem;
    box-shadow: 0 18px 44px rgba(73, 49, 40, 0.14);
  }
}

@media (max-width: 560px) {
  .hero:has(#setup-state:not([hidden])) {
    gap: 1.75rem;
    padding-block: 2.25rem 3.25rem;
  }

  .hero:has(#setup-state:not([hidden])) .checkin-card {
    min-height: 0;
    padding: 0 0.8rem 1.25rem;
  }

  .hero:has(#setup-state:not([hidden])) .welcome-art {
    width: calc(100% + 1.6rem);
    display: block;
    aspect-ratio: 1.91 / 1;
    margin: 0 -0.8rem 1.2rem;
    border: 0;
    border-radius: 1.55rem 1.55rem 0.9rem 0.9rem;
    box-shadow: 0 12px 28px rgba(73, 49, 40, 0.12);
  }
}

/* Returning record: make the nightly action small, clear, and calendar-led. */
.today-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  scroll-margin-top: 1rem;
}

body.has-active-record .hero {
  display: block;
  min-height: 0;
  padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
}

body.has-active-record .hero .intro,
body.has-active-record .hero .heart-orbit,
body.has-active-record .hero .welcome-art {
  display: none;
}

body.has-active-record .checkin-card {
  width: min(44rem, 100%);
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  margin-inline: auto;
  padding: clamp(1.2rem, 4vw, 2rem);
  text-align: left;
  border-radius: clamp(1.45rem, 4vw, 2rem);
}

body.has-active-record .tracker-state {
  width: 100%;
}

body.has-active-record .tracker-copy {
  max-width: 36rem;
  margin: 0.5rem 0 0;
}

body.has-active-record .child-actions {
  grid-template-columns: 1fr !important;
  gap: 0.65rem;
  margin-top: 1rem;
}

body.has-active-record .child-hold-button {
  min-height: 4.35rem;
  padding: 0.7rem 0.8rem;
}

.child-hold-button[aria-disabled="true"] {
  cursor: default;
}

.child-hold-button[aria-disabled="true"]:hover {
  transform: none;
}

.child-hold-button.is-saving {
  cursor: wait;
  opacity: 0.72;
  pointer-events: none;
}

.calendar-day.just-remembered-day {
  animation: remembered-day 720ms ease;
}

@keyframes remembered-day {
  0% {
    transform: scale(0.92);
    background: rgba(242, 209, 200, 0.9);
  }
  55% {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(143, 64, 52, 0.16);
  }
  100% {
    transform: scale(1);
  }
}

body.has-active-record .records-section {
  padding-top: clamp(1.25rem, 3vw, 2.25rem);
}

@media (max-width: 560px) {
  body.has-active-record .hero {
    padding-block: 1rem 1.5rem;
  }

  body.has-active-record .checkin-card {
    padding: 1.05rem;
  }

  body.has-active-record .records-section {
    padding-top: 1rem;
  }
}

/* Dark keepsake shell: warm neutrals structure the page, coral marks actions
   and selection, and sage marks days that were held. */
:root {
  --paper: #f7f0e7;
  --paper-deep: #e9dfd4;
  --ink: #302724;
  --ink-soft: #6b5d56;
  --coral: #a65145;
  --coral-deep: #843b33;
  --coral-soft: #efddd7;
  --sage: #5c7762;
  --sage-soft: #dce8dd;
  --white: #fffaf4;
  --line: rgba(70, 50, 42, 0.14);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  --night: #1f1a18;
  --night-text: #f5ede5;
  --night-muted: #c9bbb1;
  --night-line: rgba(245, 237, 229, 0.14);
}

html,
body {
  background: var(--night);
}

body {
  color: var(--night-text);
}

.glow {
  display: none;
}

.brand {
  padding-left: 0;
  color: var(--night-text);
  border-left: 0;
}

.site-header {
  border-bottom-color: var(--night-line);
}

.header-note,
.intro-copy,
.records-caption,
footer {
  color: var(--night-muted);
}

.intro h1,
.records-section h2 {
  color: var(--night-text);
}

.eyebrow,
.section-kicker {
  color: var(--night-muted);
}

.account-button {
  color: var(--night-text);
  background: var(--coral);
  border-color: var(--coral);
}

.account-button:hover {
  color: var(--night-text);
  background: var(--coral-deep);
  border-color: var(--coral-deep);
}

.today-label {
  color: var(--night-muted);
  background: transparent;
  border-color: var(--night-line);
}

.checkin-card {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.records-empty.records-preview {
  background: var(--paper);
  border-color: var(--line);
}

.sample-days .is-held {
  background: var(--sage-soft);
  border-color: rgba(70, 112, 78, 0.34);
}

.sample-record {
  background: var(--white);
}

.sample-day-detail {
  background: var(--coral-soft);
}

.sample-days .is-selected {
  box-shadow:
    inset 0 0 0 1px rgba(143, 56, 46, 0.62),
    0 0 0 2px rgba(242, 200, 187, 0.55);
}

.records-companion-art {
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.child-hold-button {
  background: #fff8f2;
  border-color: rgba(178, 91, 70, 0.16);
}

.child-hold-button:hover {
  background: #f8e3da;
}

.child-hold-button.is-held-today {
  background: #dce9dd;
  border-color: rgba(67, 111, 76, 0.34);
}

.child-hold-button.is-held-today:hover {
  background: #d1e4d3;
}

.child-record-tabs,
.history-view-switcher {
  background: var(--paper-deep);
  border-color: var(--line);
}

.child-record-tab.is-selected,
.history-view-tab.is-selected,
.history-view-tab[aria-selected="true"] {
  background: var(--coral-soft);
  border-color: rgba(166, 81, 69, 0.42);
  box-shadow: 0 6px 18px rgba(121, 65, 50, 0.1);
}

.summary-card {
  color: var(--ink);
  background: var(--paper);
}

.month-calendar {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.calendar-day {
  background: var(--white);
  border-color: var(--line);
}

.calendar-nav {
  background: var(--paper-deep);
  border-color: var(--line);
}

.calendar-remembered {
  background: var(--sage-soft);
  border-color: rgba(64, 108, 74, 0.36);
}

.calendar-today:not(.calendar-remembered) {
  background: var(--white);
  border-color: var(--coral);
}

.calendar-today {
  box-shadow: inset 0 0 0 1px rgba(143, 56, 46, 0.55);
}

.calendar-selected {
  border-color: var(--coral-deep);
  box-shadow:
    inset 0 0 0 1px var(--coral-deep),
    0 0 0 3px rgba(185, 75, 57, 0.2),
    0 5px 14px rgba(73, 49, 40, 0.1);
}

.calendar-selected-day {
  background: var(--coral-soft);
  border-color: rgba(143, 56, 46, 0.16);
}

.account-dialog,
.account-panel,
.six-month-story {
  color: var(--ink);
  background: var(--paper);
}

.calendar-day.calendar-before-record {
  background: var(--paper-deep);
  border-color: transparent;
}

.calendar-day.calendar-future {
  background: transparent;
}

.calendar-day.calendar-remembered:not(:disabled):hover {
  background: #c8dfcc;
}

.calendar-day.calendar-today:not(.calendar-remembered):not(:disabled):hover {
  background: var(--coral-soft);
}

.footer-signature {
  padding-left: 0;
  border-left: 0;
}

.footer-links a {
  color: var(--night-muted);
  background: transparent;
  border-color: var(--night-line);
}

.footer-links a:hover {
  color: var(--night-text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 237, 229, 0.28);
}

/* Final semantic theme: muted rose shell, parchment surfaces, coral actions,
   and sage held days. */
:root {
  --paper: #4a303a;
  --paper-deep: #eadfd8;
  --surface: #f6eee7;
  --surface-raised: #fff8f2;
  --surface-muted: #eadfd8;
  --ink: #33272a;
  --ink-soft: #6f5c62;
  --ambient-ink: #fbf0eb;
  --ambient-muted: #decaca;
  --white: #fff8f3;
  --line: rgba(70, 48, 57, 0.16);
  --shadow: 0 26px 72px rgba(25, 11, 17, 0.2);
  --coral: #9d4d48;
  --coral-deep: #7f3b38;
  --coral-soft: #f0d8d5;
  --coral-bright: #9d4d48;
  --sage: #5c7762;
  --sage-soft: #dce8dd;
}

html,
body {
  color-scheme: dark;
  color: var(--ambient-ink);
  background: var(--paper);
}

.brand {
  color: var(--ambient-ink);
}

.site-header {
  border-bottom-color: var(--line);
}

.header-note,
.intro-copy,
.today-label,
.records-caption,
footer,
.footer-links a {
  color: var(--ambient-muted);
}

.intro h1,
.records-section h2 {
  color: var(--ambient-ink);
}

.eyebrow,
.section-kicker {
  color: var(--ambient-muted);
}

.card-kicker,
.summary-eyebrow,
.sample-record-heading span,
.records-preview-copy .records-preview-kicker {
  color: var(--ink-soft);
}

.checkin-card,
.sample-record,
.memory-panel,
.summary-card,
.account-dialog,
.account-panel,
.six-month-story,
.trust-grid article {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.today-label,
.records-empty,
.records-empty.records-preview,
.sample-day-detail,
.welcome-steps span,
.welcome-reassurance,
.stat,
.history-figure,
.quilt-figure,
.year-recap,
.month-detail,
.month-calendar,
.calendar-record-tools-body,
.story-facts,
.story-fact,
.chapter-detail,
.chapter-facts,
.chapter-empty,
.history-view-empty,
.history-action-status,
.local-record-panel,
.reminder-settings,
.reminder-status,
.reminder-name-option,
.legacy-note,
.account-benefits span,
.summary-actions .small-action {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--line);
}

.welcome-art,
.records-companion-art {
  background: var(--surface-raised);
  border-color: var(--line);
}

.records-companion-art {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.sample-days > span {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--line);
}

.sample-days > i {
  background: transparent;
  border-color: transparent;
}

.sample-days b {
  color: var(--sage);
}

.main-heart,
.child-portrait,
.empty-mark,
.welcome-steps b {
  color: var(--ink-soft);
  background: var(--surface-muted);
  border-color: var(--line);
  box-shadow: none;
}

.account-benefits span::before,
.chapter-empty span {
  color: var(--ink-soft);
}

.name-form input,
.name-form .profile-fields input,
.memory-panel textarea,
.account-form input,
.calendar-month-picker,
.reminder-controls select,
.reminder-name-option {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--line);
  box-shadow: none;
  caret-color: var(--coral-bright);
}

.name-form input::placeholder,
.memory-panel textarea::placeholder,
.account-form input::placeholder {
  color: rgba(201, 183, 168, 0.66);
}

.account-dialog::backdrop {
  background: rgba(8, 5, 4, 0.76);
}

.account-button,
.story-toggle {
  color: var(--coral-bright);
  background: var(--surface-raised);
  border-color: rgba(240, 138, 115, 0.48);
}

.account-button:hover,
.story-toggle:hover,
.dialog-close:hover {
  color: var(--ink);
  background: var(--coral-soft);
  border-color: var(--coral-bright);
}

.button-primary {
  color: var(--white);
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.button-primary:hover {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
}

.button-danger,
.danger-small-action {
  color: var(--coral-bright);
  background: transparent;
  border-color: rgba(240, 138, 115, 0.48);
}

.button-danger:hover,
.danger-small-action:hover {
  color: var(--white);
  background: var(--coral-deep);
  border-color: var(--coral-deep);
}

.child-hold-button {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--line);
}

.child-hold-button:not(.is-held-today):hover {
  background: var(--coral-soft);
  border-color: rgba(240, 138, 115, 0.5);
}

.child-heart {
  color: var(--coral-bright);
  background: var(--coral-soft);
}

.plus-mark {
  color: var(--white);
  background: var(--coral);
}

.text-button,
.small-action,
.memory-invite {
  color: var(--ink-soft);
}

.text-button:hover,
.small-action:hover,
.memory-invite:hover,
.primary-small-action,
.calendar-detail-action,
.privacy-copy a,
.trust-center a {
  color: var(--coral-bright);
  border-color: var(--coral-bright);
}

.skip-link {
  color: var(--white);
  background: var(--coral);
}

.child-record-tabs,
.history-view-switcher {
  background: var(--surface-raised);
  border-color: var(--line);
}

.child-record-tab,
.history-view-tab,
.chapter-month-tab {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
}

.child-record-tab:hover,
.history-view-tab:hover,
.chapter-month-tab:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.child-record-tab.is-selected,
.history-view-tab.is-selected,
.history-view-tab[aria-selected="true"],
.chapter-month-tab.is-selected {
  color: var(--ink);
  background: var(--coral-soft);
  border-color: var(--coral-bright);
  box-shadow: none;
}

.sample-days .is-selected {
  box-shadow:
    inset 0 0 0 1px var(--coral-bright),
    0 0 0 2px rgba(240, 138, 115, 0.24);
}

.calendar-selected {
  border-color: var(--coral-bright);
  box-shadow:
    inset 0 0 0 1px var(--coral-bright),
    0 0 0 3px rgba(240, 138, 115, 0.2);
}

.calendar-selected-day {
  background: var(--coral-soft);
  border-color: rgba(240, 138, 115, 0.42);
}

.quilt-selected {
  outline-color: var(--coral-bright);
}

.sample-days .is-held,
.child-hold-button.is-held-today,
.child-hold-button.is-held-today:hover,
.last-held,
.calendar-remembered,
.calendar-legend-mark.is-remembered {
  color: var(--ink);
  background: var(--sage-soft);
  border-color: rgba(155, 194, 164, 0.46);
}

.child-hold-button.is-held-today .child-heart {
  color: var(--sage);
  background: #cfe1d2;
}

.child-hold-button.is-held-today .plus-mark {
  color: var(--white);
  background: #5c7762;
}

.primary-small-action.is-held-today,
.confirmation {
  color: var(--sage);
  border-color: rgba(155, 194, 164, 0.46);
}

.calendar-day i {
  color: var(--white);
  background: #5c7762;
}

.calendar-day.calendar-remembered:not(:disabled):hover {
  background: #cfe1d2;
  border-color: var(--sage);
}

.chart-line {
  stroke: var(--sage);
}

.chart-point {
  fill: var(--surface);
  stroke: var(--sage);
}

.chart-point-today {
  fill: var(--sage);
}

.rhythm-mark,
.quilt-cell,
.chapter-bar {
  color: var(--ink);
  background: var(--surface-muted);
}

.rhythm-level-1,
.quilt-level-1 {
  color: var(--ink);
  background: #edf3ed;
}

.rhythm-level-2,
.quilt-level-2 {
  color: var(--ink);
  background: #dce8dd;
}

.rhythm-level-3,
.quilt-level-3 {
  color: var(--ink);
  background: #c9decf;
}

.rhythm-level-4,
.quilt-level-4 {
  color: var(--ink);
  background: #b4d2bb;
}

.story-preview-month i,
.chapter-bar i {
  background: #5c7762;
}

.calendar-day {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--line);
}

.calendar-day:not(:disabled):hover {
  background: var(--surface-muted);
  border-color: rgba(240, 138, 115, 0.42);
}

.calendar-nav {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--line);
}

.calendar-nav:not(:disabled):hover {
  background: var(--coral-soft);
  border-color: var(--coral-bright);
}

.calendar-today:not(.calendar-remembered),
.calendar-day.calendar-today:not(.calendar-remembered):not(:disabled):hover {
  background: var(--surface-muted);
  border-color: rgba(157, 77, 72, 0.44);
}

.calendar-today {
  box-shadow: inset 0 0 0 1px rgba(51, 39, 42, 0.32);
}

.calendar-day.calendar-before-record {
  background: var(--surface-muted);
  border-color: transparent;
}

.calendar-day.calendar-future,
.quilt-future {
  background: transparent;
  border-color: var(--line);
}

.calendar-legend-mark {
  color: var(--ink-soft);
  background: var(--surface-raised);
  border-color: var(--line);
}

.rhythm-today .rhythm-mark,
.quilt-current {
  outline-color: rgba(51, 39, 42, 0.36);
}

.record-start-note > span:first-child {
  background: var(--ink-soft);
  border-color: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.quilt-record-start {
  box-shadow:
    inset 0 0 0 2px var(--surface),
    0 0 0 1px rgba(51, 39, 42, 0.36);
}

.account-message,
.memory-message,
.history-action-status {
  color: var(--ink-soft);
}

.account-message.is-error,
.memory-message.is-error,
.history-action-status.is-error {
  color: var(--ink);
}

.reminder-status.is-on {
  color: var(--ink);
  background: var(--surface-muted);
  border-color: var(--line);
}

.reminder-name-option input {
  accent-color: var(--coral);
}

.footer-signature {
  padding-left: 0;
  border-left: 0;
}

.footer-links a {
  color: var(--ambient-muted);
  background: transparent;
  border-color: rgba(255, 240, 235, 0.2);
}

.footer-links a:hover {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--coral-bright);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible,
.child-record-tab:focus-visible,
.year-quilt-grid button.quilt-cell:focus-visible {
  outline: 3px solid var(--coral-bright);
  outline-offset: 3px;
}

@keyframes remembered {
  0% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.025);
    background: var(--sage-soft);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes remembered-day {
  0% {
    transform: scale(0.92);
    background: var(--sage-soft);
  }
  55% {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
  }
  100% {
    transform: scale(1);
  }
}
