:root {
  color-scheme: light;
  --blue: #1597d5;
  --deep-blue: #0f6fa8;
  --ink: #14384f;
  --soft-ink: #45687a;
  --white: #ffffff;
  --cream: #fff8df;
  --red: #f05454;
  --yellow: #ffd34e;
  --mint: #64d2b7;
  --pink: #ff8ab3;
  --shadow: 0 24px 70px rgba(12, 78, 120, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #e7f7ff;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}

::selection {
  color: var(--white);
  background: var(--deep-blue);
}

.love-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0 18%, transparent 18% 100%),
    repeating-linear-gradient(
      -12deg,
      rgba(255, 255, 255, 0.5) 0 2px,
      transparent 2px 26px
    ),
    linear-gradient(160deg, #e8f8ff 0%, #bfeeff 46%, #fff4ca 100%);
}

.love-page::before,
.love-page::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.love-page::before {
  inset: auto -8vw -12vw -8vw;
  height: 28vw;
  min-height: 180px;
  background:
    radial-gradient(ellipse at 14% 68%, #ffffff 0 26%, transparent 27%),
    radial-gradient(ellipse at 34% 48%, #ffffff 0 32%, transparent 33%),
    radial-gradient(ellipse at 58% 62%, #ffffff 0 28%, transparent 29%),
    radial-gradient(ellipse at 80% 44%, #ffffff 0 32%, transparent 33%);
  opacity: 0.72;
}

.love-page::after {
  top: 0;
  right: 0;
  width: 34%;
  height: 100%;
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(255, 255, 255, 0.45) 42% 46%, transparent 46% 100%),
    linear-gradient(90deg, transparent 0 66%, rgba(255, 211, 78, 0.45) 66% 70%, transparent 70% 100%);
  opacity: 0.55;
}

.site-nav {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  min-height: 56px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 3px solid rgba(20, 56, 79, 0.2);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(12, 78, 120, 0.14);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.brand-mark,
.nav-links,
.nav-links a {
  display: flex;
  align-items: center;
}

.brand-mark,
.nav-links a {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  gap: 9px;
  min-width: 0;
  font-weight: 950;
}

.brand-bell {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.brand-bell::before,
.brand-bell::after {
  position: absolute;
  content: "";
  background: var(--ink);
}

.brand-bell::before {
  top: 8px;
  left: 5px;
  width: 12px;
  height: 3px;
  border-radius: 999px;
}

.brand-bell::after {
  bottom: 4px;
  left: 10px;
  width: 4px;
  height: 7px;
  border-radius: 999px;
}

.nav-links {
  gap: 6px;
  flex: 0 0 auto;
}

.nav-links a {
  min-height: 38px;
  padding: 0 14px;
  justify-content: center;
  color: var(--soft-ink);
  font-size: 0.92rem;
  font-weight: 900;
  border: 2px solid transparent;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--deep-blue);
  background: var(--white);
  border-color: rgba(20, 56, 79, 0.16);
  outline: none;
}

.sky-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-lines span {
  position: absolute;
  width: 190px;
  height: 30px;
  border-top: 3px solid rgba(15, 111, 168, 0.16);
  border-radius: 999px;
  animation: drift 9s ease-in-out infinite alternate;
}

.sky-lines span:nth-child(1) {
  top: 13%;
  left: 8%;
}

.sky-lines span:nth-child(2) {
  top: 24%;
  right: 10%;
  width: 150px;
  animation-delay: -2s;
}

.sky-lines span:nth-child(3) {
  bottom: 20%;
  left: 15%;
  width: 130px;
  animation-delay: -4s;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(320px, 1fr);
  grid-template-areas:
    "copy mascot"
    "timer timer";
  gap: 32px 42px;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 54px 0 48px;
  align-content: center;
}

.hero-copy {
  grid-area: copy;
  align-self: end;
  padding-bottom: 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 7px 14px;
  color: var(--deep-blue);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(15, 111, 168, 0.18);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 111, 168, 0.12);
}

h1 {
  max-width: 9em;
  margin: 0;
  font-size: 5.6rem;
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--soft-ink);
  font-size: 1.16rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.love-quote {
  position: relative;
  max-width: 560px;
  margin: 24px 0 0;
  padding: 18px 20px 18px 58px;
  background: rgba(255, 255, 255, 0.78);
  border: 3px solid rgba(20, 56, 79, 0.2);
  border-radius: 8px;
  box-shadow: 8px 8px 0 rgba(21, 151, 213, 0.12);
}

.love-quote span {
  position: absolute;
  top: 10px;
  left: 18px;
  color: var(--red);
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
}

.love-quote p {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.mascot-scene {
  grid-area: mascot;
  position: relative;
  display: grid;
  min-height: 390px;
  align-self: center;
  justify-self: center;
  width: min(430px, 100%);
  place-items: center;
}

.spark,
.spark::before,
.spark::after {
  position: absolute;
  content: "";
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 5px 6px 0 rgba(20, 56, 79, 0.11);
}

.spark {
  width: 34px;
  height: 34px;
  transform: rotate(45deg);
  animation: bob 3.6s ease-in-out infinite;
}

.spark::before,
.spark::after {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.spark::before {
  top: -34px;
  left: 24px;
  background: var(--pink);
}

.spark::after {
  right: -38px;
  bottom: -18px;
  background: var(--mint);
}

.spark-one {
  top: 34px;
  left: 20px;
}

.spark-two {
  right: 18px;
  bottom: 72px;
  transform: rotate(45deg) scale(0.72);
  animation-delay: -1.4s;
}

.mascot-image {
  position: relative;
  z-index: 1;
  display: block;
  width: min(360px, 88%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 28px 42px rgba(12, 78, 120, 0.24));
}

.time-machine {
  grid-area: timer;
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 211, 78, 0.45) 0 42px, transparent 43px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow:
    12px 12px 0 rgba(20, 56, 79, 0.12),
    var(--shadow);
}

.time-machine::before {
  position: absolute;
  right: 28px;
  bottom: 22px;
  width: 180px;
  height: 74px;
  content: "";
  border: 4px solid rgba(20, 56, 79, 0.22);
  border-top: 0;
  border-radius: 0 0 999px 999px;
  pointer-events: none;
}

.timer-header,
.start-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-header {
  margin-bottom: 18px;
}

.timer-header p,
.start-line p {
  margin: 0;
}

.timer-header p {
  color: var(--deep-blue);
  font-size: 1rem;
  font-weight: 900;
}

.timer-dot {
  width: 18px;
  height: 18px;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.timer-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.7fr) repeat(3, minmax(132px, 1fr));
  gap: 14px;
}

.time-unit {
  display: grid;
  min-height: 150px;
  padding: 18px 16px;
  place-items: center;
  text-align: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: inset 0 -9px 0 rgba(255, 211, 78, 0.35);
}

.time-unit:nth-child(2) {
  background: #e9fbff;
  box-shadow: inset 0 -9px 0 rgba(21, 151, 213, 0.16);
}

.time-unit:nth-child(3) {
  background: #fff0f6;
  box-shadow: inset 0 -9px 0 rgba(255, 138, 179, 0.2);
}

.time-unit:nth-child(4) {
  background: #edfff9;
  box-shadow: inset 0 -9px 0 rgba(100, 210, 183, 0.22);
}

.time-unit strong {
  display: block;
  max-width: 100%;
  color: var(--ink);
  font-size: 3.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.time-unit-days strong {
  font-size: 3.8rem;
}

.time-unit span {
  color: var(--soft-ink);
  font-size: 0.96rem;
  font-weight: 800;
}

.tick {
  animation: tick 0.28s ease-out;
}

.start-line {
  min-height: 48px;
  margin-top: 18px;
  color: var(--soft-ink);
  font-size: 1rem;
  font-weight: 700;
}

.mini-bell {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.mini-bell::before,
.mini-bell::after {
  position: absolute;
  content: "";
  background: var(--ink);
}

.mini-bell::before {
  top: 9px;
  left: 5px;
  width: 14px;
  height: 3px;
  border-radius: 999px;
}

.mini-bell::after {
  bottom: 4px;
  left: 11px;
  width: 4px;
  height: 8px;
  border-radius: 999px;
}

.comments-page {
  overflow-x: hidden;
}

.comments-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(360px, 1.14fr);
  grid-template-areas:
    "intro form"
    "list list";
  gap: 24px;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 118px 0 52px;
  align-content: start;
}

.comments-hero {
  grid-area: intro;
  align-self: center;
}

.comments-hero h1 {
  font-size: 4.6rem;
}

.comment-panel,
.comment-list-panel,
.comment-card,
.empty-state {
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 10px 10px 0 rgba(20, 56, 79, 0.1);
}

.comment-panel,
.comment-list-panel {
  position: relative;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 211, 78, 0.35) 0 38px, transparent 39px),
    rgba(255, 255, 255, 0.9);
}

.comment-panel {
  grid-area: form;
  padding: 26px;
}

.comment-list-panel {
  grid-area: list;
  padding: 26px;
}

.panel-heading,
.list-heading,
.comment-card-header,
.form-footer {
  display: flex;
  align-items: center;
}

.panel-heading {
  gap: 12px;
  margin-bottom: 22px;
}

.panel-heading h2,
.list-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.2;
}

.panel-heading p {
  margin: 6px 0 0;
  color: var(--soft-ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.86);
  border: 3px solid rgba(20, 56, 79, 0.22);
  border-radius: 8px;
  outline: none;
}

.comment-form input {
  min-height: 48px;
  padding: 0 14px;
}

.comment-form textarea {
  min-height: 128px;
  padding: 13px 14px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--deep-blue);
  box-shadow: 0 0 0 4px rgba(21, 151, 213, 0.14);
}

.form-footer {
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
}

.form-status[data-tone="success"] {
  color: #157a62;
}

.form-status[data-tone="error"] {
  color: #c03535;
}

.comment-form button,
.delete-comment {
  flex: 0 0 auto;
  min-height: 42px;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 950;
  cursor: pointer;
  border: 3px solid var(--ink);
  border-radius: 8px;
}

.comment-form button {
  padding: 0 18px;
  background: var(--yellow);
  box-shadow: 5px 5px 0 rgba(20, 56, 79, 0.12);
}

.comment-form button:hover,
.comment-form button:focus-visible {
  background: #ffe17b;
  outline: none;
}

.list-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.list-heading .eyebrow {
  min-height: 28px;
  margin: 0 0 8px;
  padding: 5px 10px;
  font-size: 0.74rem;
}

.comment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 86px;
  margin: 0;
  color: var(--deep-blue);
  font-weight: 950;
  background: var(--cream);
  border: 3px solid rgba(20, 56, 79, 0.2);
  border-radius: 999px;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-card {
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(21, 151, 213, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.9);
}

.comment-card-header {
  gap: 12px;
}

.comment-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  place-items: center;
}

.comment-card-header div {
  min-width: 0;
}

.comment-card-header strong,
.comment-card-header time {
  display: block;
}

.comment-card-header strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1.02rem;
}

.comment-card-header time {
  margin-top: 3px;
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.delete-comment {
  margin-left: auto;
  padding: 0 12px;
  color: #b33434;
  background: #fff5f5;
}

.delete-comment:hover,
.delete-comment:focus-visible {
  background: #ffe7e7;
  outline: none;
}

.comment-content {
  margin: 14px 0 0;
  color: var(--soft-ink);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty-state {
  display: grid;
  min-height: 128px;
  margin-top: 14px;
  padding: 20px;
  color: var(--soft-ink);
  font-weight: 850;
  text-align: center;
  background: rgba(255, 248, 223, 0.9);
  place-items: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state p {
  margin: 10px 0 0;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(26px, 10px, 0);
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -12px;
  }
}

@keyframes tick {
  0% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.06);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  .site-nav {
    top: 14px;
    width: min(100% - 28px, 620px);
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "mascot"
      "timer";
    width: min(100% - 28px, 620px);
    padding: 34px 0 38px;
    gap: 22px;
  }

  .hero-copy {
    align-self: start;
    padding-bottom: 0;
  }

  h1 {
    max-width: 8em;
    font-size: 3.4rem;
  }

  .lead {
    font-size: 1.04rem;
    line-height: 1.75;
  }

  .love-quote {
    max-width: none;
  }

  .mascot-scene {
    min-height: 318px;
    width: min(350px, 100%);
  }

  .mascot-image {
    width: min(318px, 88%);
  }

  .timer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-unit {
    min-height: 132px;
  }

  .time-unit strong,
  .time-unit-days strong {
    font-size: 2.72rem;
  }

  .comments-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "form"
      "list";
    width: min(100% - 28px, 620px);
    padding-top: 100px;
  }

  .comments-hero h1 {
    font-size: 3.4rem;
  }
}

@media (max-width: 520px) {
  .love-page {
    overflow-x: hidden;
  }

  .love-page::after {
    width: 70%;
  }

  .hero {
    width: min(100% - 24px, 430px);
    min-height: auto;
    padding: 126px 0 30px;
  }

  .site-nav {
    width: min(100% - 24px, 430px);
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .brand-mark {
    justify-content: center;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1 1 0;
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .eyebrow {
    min-height: 30px;
    margin-bottom: 14px;
    font-size: 0.76rem;
  }

  h1 {
    max-width: 7.5em;
    font-size: 2.72rem;
    line-height: 1;
  }

  .lead {
    margin-top: 16px;
    font-size: 0.98rem;
  }

  .love-quote {
    margin-top: 18px;
    padding: 16px 16px 16px 46px;
  }

  .love-quote span {
    top: 10px;
    left: 14px;
    font-size: 2.4rem;
  }

  .love-quote p {
    font-size: 0.98rem;
  }

  .mascot-scene {
    min-height: 258px;
    width: min(292px, 100%);
  }

  .mascot-image {
    width: min(248px, 88%);
  }

  .spark {
    width: 26px;
    height: 26px;
    border-width: 2px;
  }

  .spark::before,
  .spark::after {
    border-width: 2px;
  }

  .time-machine {
    padding: 20px;
    border-width: 3px;
    box-shadow:
      7px 7px 0 rgba(20, 56, 79, 0.12),
      0 18px 44px rgba(12, 78, 120, 0.19);
  }

  .time-machine::before {
    right: 18px;
    bottom: 18px;
    width: 116px;
    height: 50px;
    border-width: 3px;
  }

  .timer-grid {
    gap: 10px;
  }

  .time-unit {
    min-height: 112px;
    padding: 14px 8px;
    border-width: 2px;
  }

  .time-unit strong,
  .time-unit-days strong {
    font-size: 2.24rem;
  }

  .time-unit span,
  .timer-header p,
  .start-line {
    font-size: 0.9rem;
  }

  .comments-shell {
    width: min(100% - 24px, 430px);
    padding: 126px 0 30px;
    gap: 18px;
  }

  .comments-hero h1 {
    font-size: 2.72rem;
  }

  .comment-panel,
  .comment-list-panel {
    padding: 20px;
  }

  .panel-heading,
  .list-heading,
  .form-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-form button {
    width: 100%;
  }

  .comment-count {
    min-width: 78px;
  }

  .comment-card {
    padding: 16px;
  }

  .delete-comment {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.84rem;
  }
}

@media (max-width: 370px) {
  .timer-grid {
    grid-template-columns: 1fr;
  }

  .time-unit {
    min-height: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .tick {
    animation: none;
  }
}
