:root {
  --cream: #fdebdc;
  --cream-soft: #fff5ec;
  --rose: #c97882;
  --rose-dark: #8f4855;
  --rose-light: #e7b2b9;
  --cocoa: #5f3a3f;
  --white: rgba(255, 255, 255, 0.76);
  --shadow: rgba(143, 72, 85, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cocoa);
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(253, 235, 220, 0.08), rgba(253, 235, 220, 0.08)),
    url("assets/soft-hearts-wide.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.love-app {
  min-height: 100svh;
  display: grid;
  place-items: center;
  gap: clamp(1rem, 3vw, 1.6rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  position: relative;
}

.love-app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.38) 22rem, transparent 41rem),
    linear-gradient(180deg, rgba(255, 245, 236, 0.18), rgba(255, 225, 225, 0.12));
}

.counter-card,
.tiny-panel {
  position: relative;
  z-index: 1;
}

.counter-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.overline {
  margin: 0 0 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--rose-dark);
  font-family: Comfortaa, Nunito, sans-serif;
  font-size: clamp(1rem, 3.2vw, 1.28rem);
  font-weight: 700;
  text-transform: lowercase;
}

.overline span {
  color: var(--rose);
  font-size: 1.5em;
  line-height: 1;
}

.main-number {
  width: min(460px, 88vw);
  padding: 1.15rem 1.35rem 1.05rem;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow:
    0 22px 60px var(--shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.time-stack button:hover,
.time-stack button.is-active {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 20px 46px rgba(143, 72, 85, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.96);
}

.main-number span {
  color: var(--rose-dark);
}

#fullDuration {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem 0.65rem;
  align-items: center;
}

#fullDuration span {
  display: block;
  font-size: clamp(1.55rem, 5vw, 2.55rem);
  font-weight: 900;
  line-height: 1.08;
  white-space: nowrap;
}

.main-number small {
  display: block;
  margin-top: 0.25rem;
  color: var(--rose);
  font-family: Comfortaa, Nunito, sans-serif;
  font-size: clamp(1.1rem, 4vw, 1.8rem);
  font-weight: 700;
}

.time-stack {
  width: min(360px, 86vw);
  margin-top: 1rem;
  display: grid;
  gap: 0.58rem;
}

.time-stack button {
  min-height: 48px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 12px 34px rgba(143, 72, 85, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.time-stack span {
  min-width: 2ch;
  color: var(--rose-dark);
  font-size: clamp(1.4rem, 6vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}

.time-stack small {
  color: var(--cocoa);
  font-family: Comfortaa, Nunito, sans-serif;
  font-size: clamp(0.88rem, 3.4vw, 1.1rem);
  font-weight: 700;
}

.message-box {
  width: min(620px, 100%);
  min-height: 74px;
  margin-top: clamp(2rem, 7vh, 4.2rem);
  padding: 0 0.6rem;
  display: grid;
  place-items: center;
}

.message-box p {
  margin: 0;
  color: var(--rose-dark);
  font-family: Comfortaa, Nunito, sans-serif;
  font-size: clamp(1rem, 3vw, 1.22rem);
  font-weight: 700;
  line-height: 1.55;
  text-wrap: balance;
}

.message-box::after {
  content: "";
  width: min(390px, 70vw);
  height: 2px;
  margin-top: 1rem;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(143, 72, 85, 0.36), transparent);
}

.tiny-panel {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.tiny-panel article {
  min-height: 86px;
  padding: 0.9rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    0 18px 42px rgba(143, 72, 85, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.84);
  text-align: center;
}

.tiny-panel span {
  display: block;
  color: var(--rose-dark);
  font-size: clamp(1.15rem, 5vw, 1.75rem);
  font-weight: 900;
}

.tiny-panel small {
  color: var(--cocoa);
  font-family: Comfortaa, Nunito, sans-serif;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 560px) {
  body {
    background-size: cover;
    background-attachment: scroll;
  }

  .love-app {
    align-content: center;
    gap: 1rem;
  }

  .tiny-panel {
    grid-template-columns: 1fr;
  }

}
