/* V4: live merged cards, backed by the existing V3 journal and goal model. */
body { background: linear-gradient(180deg, #f4f6ef, #fafbf7 56%, #f5f6f0); }
.brand[aria-label] { letter-spacing: -.075em; }
.timer-section .daily-goals {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.timer-section .daily-goals-heading {
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid #dce5d9;
  border-radius: 18px;
  background: #ffffffa3;
  box-shadow: none;
}
.timer-section .goal-setting-card {
  min-width: 0;
  width: 28%;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.timer-section .goal-setting-card:hover:not(:disabled) { box-shadow: none; background: #f2f6ef; }
.timer-section .daily-goals-intro { width: 40%; }
.timer-section .daily-goals-intro h2 { font-size: clamp(1.3rem, 2.5vw, 2rem); }
.timer-section .daily-goals-intro > p:last-child { font-size: .73rem; }
.timer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.timer-card-nav { display: none; }
.v4-merged-card {
  --accent: #678c9e;
  --tint: #eff5f7;
  --edge: #dbe8ed;
  --text: #476d82;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 25px;
  background: var(--tint);
  color: var(--text);
  transition: border-color .25s, box-shadow .25s;
}
.v4-desire { --accent: #b87e77; --tint: #fbf2ef; --edge: #efdfda; --text: #955f59; }
.v4-create { --accent: #6b9476; --tint: #f0f6ee; --edge: #dfebdc; --text: #52775d; }
.v4-merged-card:has(> .timer-card.is-active) { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 17%, transparent); }
.v4-merged-card:has(.goal-progress.is-complete) { border-color: #79a587; box-shadow: 0 0 0 4px #b8d6bf56; }
.v4-merged-card:has(.goal-progress.is-exhausted) { border-color: #c08076; box-shadow: 0 0 0 4px #e5bbb358; }
.v4-merged-card:has(> .timer-card.is-bedtime-locked) { --accent: #89928a; --tint: #f0f2ed; --edge: #dfe4dc; --text: #7c897b; }
.v4-merged-card:has(.goal-progress.is-bedtime-locked) { --accent: #89928a; --tint: #f0f2ed; --edge: #dfe4dc; --text: #7c897b; }
.v4-card-heading { position: relative; min-height: 132px; padding: 24px 28px 0; }
.v4-card-heading .card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.v4-card-heading .timer-icon { width: 42px; height: 42px; border-radius: 13px; color: var(--accent); box-shadow: none; }
.v4-card-heading .timer-icon svg { width: 24px; height: 24px; }
.v4-card-heading .card-index { color: var(--text); opacity: 1; font-size: .6rem; font-weight: 650; }
.v4-card-heading .timer-name { display: block; margin-top: 14px; font-size: clamp(2.35rem, 3vw, 2.8rem); font-weight: 400; line-height: 1; color: var(--text); }
.v4-card-heading .timer-translation { display: block; margin-top: 7px; font-size: .7rem; color: var(--text); opacity: 1; }
.v4-merged-card .goal-progress {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 8px 28px 22px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  filter: none;
  opacity: 1;
}
.v4-merged-card .goal-progress.is-bedtime-locked { filter: grayscale(1); opacity: .67; }
.v4-merged-card .goal-title-row { justify-content: flex-end; min-height: 22px; }
.v4-merged-card .goal-title { display: none; }
.v4-merged-card .core-sleep-button { color: var(--text); font-size: .72rem; }
.v4-merged-card .goal-progress-body { display: flex; flex-direction: column; align-items: center; gap: 19px; margin: 8px 0 0; }
.v4-merged-card .goal-pie {
  width: clamp(145px, 14vw, 194px);
  flex: none;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px #ffffffa8, 0 0 0 7px color-mix(in srgb, var(--accent) 12%, transparent);
}
.v4-merged-card .goal-pie > strong {
  max-width: 85%;
  z-index: 1;
  color: var(--text);
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}
.v4-sleep .goal-pie > strong { font-size: clamp(1.12rem, 1.55vw, 1.42rem); white-space: nowrap; }
.v4-merged-card .goal-pie-status { color: #fff; }
.v4-merged-card .goal-pie-status svg { width: 67%; height: 67%; }
.v4-merged-card .goal-progress.is-complete .goal-pie > strong,
.v4-merged-card .goal-progress.is-exhausted .goal-pie > strong { opacity: 0; }
.v4-merged-card .goal-progress-copy { min-height: 80px; align-items: center; text-align: center; gap: 8px; }
.v4-merged-card .goal-progress-copy > span { color: var(--text); font-size: .88rem; font-weight: 600; line-height: 1.45; }
.v4-merged-card .goal-progress-copy p { display: block; color: var(--text); font-size: .74rem; line-height: 1.55; }
.v4-merged-card .timer-card.v4-card-action {
  display: block;
  width: 100%;
  min-height: 59px;
  margin: auto 0 0;
  padding: 17px 28px;
  border: 0;
  border-top: 1px solid var(--edge);
  border-radius: 0;
  outline: none;
  background: #ffffff31;
  box-shadow: none;
  color: var(--text);
  text-align: left;
  transition: background .2s;
}
.v4-merged-card .timer-card.v4-card-action:hover:not(:disabled) { transform: none; background: #ffffff9c; box-shadow: none; }
.v4-merged-card .timer-card.v4-card-action:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
.v4-merged-card .timer-card.v4-card-action:disabled { opacity: .68; }
.v4-merged-card .timer-card.v4-card-action.is-active { outline: none; }
.v4-merged-card .timer-card.v4-card-action.is-bedtime-locked { filter: none; background: #f0f2ed; }
.v4-merged-card .timer-action { padding: 0; margin: 0; font-size: .78rem; font-weight: 600; }
.v4-merged-card .timer-action span { line-height: 1; font-weight: 400; }
.timer-section .live-strip { margin-top: 20px; }
@media (max-width: 900px) and (min-width: 761px) {
  .v4-card-heading { padding-inline: 18px; }
  .v4-merged-card .goal-progress { padding-inline: 18px; }
  .v4-merged-card .timer-card.v4-card-action { padding-inline: 18px; }
  .v4-merged-card .goal-pie { width: 130px; }
}
@media (max-width: 760px) {
  .timer-card-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0 4px 8px; padding: 4px; border: 1px solid #dce5d9; border-radius: 14px; background: #eef2eb; }
  .timer-card-nav button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: #718375; font-family: inherit; font-size: .77rem; font-weight: 600; cursor: pointer; }
  .timer-card-nav button[aria-current="true"] { background: #fffefa; color: #2f513e; box-shadow: 0 1px 5px #29423918; }
  .timer-card-nav button:focus-visible { outline: 2px solid #719a79; outline-offset: 1px; }
  .timer-section .daily-goals { margin-bottom: 20px; }
  .timer-section .daily-goals-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .timer-section .daily-goals-intro { grid-column: 1 / -1; grid-row: 1; width: 100%; margin: 0 0 4px; }
  .timer-section .goal-setting-card { width: 100%; padding: 10px 5px; }
  .timer-section .goal-setting-card > strong { font-size: 1.35rem; }
  .timer-grid { display: flex; gap: 13px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 14px; }
  .v4-merged-card { flex: 0 0 min(82vw, 355px); scroll-snap-align: center; }
  .v4-card-heading { min-height: 128px; padding: 22px 23px 0; }
  .v4-card-heading .card-top { grid-column: auto; grid-row: auto; }
  .v4-card-heading .timer-name { margin-top: 15px; font-size: 2.55rem; }
  .v4-card-heading .timer-translation { margin-top: 7px; }
  .v4-merged-card .goal-progress { padding: 7px 23px 20px; }
  .v4-merged-card .goal-progress-body { flex-direction: column; gap: 18px; }
  .v4-merged-card .goal-pie { width: 167px; }
  .v4-merged-card .goal-progress-copy { align-items: center; text-align: center; }
  .v4-merged-card .goal-progress-copy > span { font-size: .82rem; }
  .v4-merged-card .goal-progress-copy p { font-size: .7rem; }
  .v4-merged-card .timer-card.v4-card-action { min-height: 55px; padding: 16px 23px; }
}
