@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');


* {
  box-sizing: border-box;
}


html {
  -webkit-text-size-adjust: 100%;
}


body {
  margin: 0;

  min-height: 100dvh;

  background: #fff;
  color: #101012;

  font-family: "Noto Sans KR", sans-serif;

  letter-spacing: -0.045em;

  overflow-x: hidden;
}


/* =========================
   HEADER
========================= */

header {
  height: 76px;

  max-width: 720px;

  margin: auto;
  padding: 0 22px;

  display: flex;
  align-items: center;
}


header a {
  color: #111;

  text-decoration: none;

  font-size: 24px;
  font-weight: 900;

  letter-spacing: -0.08em;
}


/* =========================
   PAGE
========================= */

main {
  max-width: 720px;

  margin: auto;
}


.screen {
  display: none;

  min-height: calc(100dvh - 76px);

  padding: 28px 22px 45px;
}


.screen.active {
  display: block;
}


/* =========================
   QUESTION
========================= */

.question {
  padding-top: 7vh;

  text-align: center;
}


.question small,
.wrap > p {
  color: #999ca4;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 0.14em;
}


.question h1,
.wrap h1 {
  margin: 14px 0;

  font-size: 52px;
  font-weight: 900;

  line-height: 1.08;

  letter-spacing: -0.075em;
}


/* =========================
   HEART IMAGE
========================= */

.heart-stage {
  position: relative;

  width: 190px;
  height: 155px;

  margin: 18px auto 8px;

  display: flex;
  align-items: center;
  justify-content: center;
}


.heart-image {
  display: block;

  width: 155px;
  height: 155px;

  object-fit: contain;

  filter:
    drop-shadow(
      0 15px 16px rgba(143, 114, 218, 0.14)
    );

  user-select: none;

  -webkit-user-drag: none;

  pointer-events: none;
}


/* =========================
   YES / NO AREA
========================= */

.choices {
  position: relative;

  width: 100%;
  max-width: 430px;
  height: 190px;

  margin: auto;
}


.choices button {
  position: absolute;

  height: 58px;

  border-radius: 999px;

  font: inherit;

  font-size: 16px;
  font-weight: 800;

  cursor: pointer;

  touch-action: manipulation;

  -webkit-tap-highlight-color: transparent;
}


/* 좋아 */

#yes {
  left: 0;
  top: 35px;

  width: 55%;

  border: 0;

  background: #161719;
  color: #fff;

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.13);

  z-index: 2;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}


#yes:active {
  transform: scale(0.98);
}


/* 싫어 */

#no {
  right: 0;
  top: 35px;

  width: 38%;

  border: 1px solid #e7e7eb;

  background: #f4f4f6;
  color: #555963;

  z-index: 3;

  transition:
    left 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;

  will-change:
    left,
    top;
}


/* =========================
   PARTICLES
========================= */

#particle-layer {
  position: fixed;

  inset: 0;

  pointer-events: none;

  overflow: hidden;

  z-index: 9999;
}


.particle {
  position: fixed;

  left: 0;
  top: 0;

  pointer-events: none;

  opacity: 0;

  animation:
    particle-float 0.72s
    cubic-bezier(0.22, 1, 0.36, 1)
    forwards;
}


.particle.dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #c9b4f7;
}


.particle.mini-heart {
  width: 11px;
  height: 11px;

  background: #c9b4f7;

  transform: rotate(-45deg);
}


.particle.mini-heart::before,
.particle.mini-heart::after {
  content: "";

  position: absolute;

  width: 11px;
  height: 11px;

  border-radius: 50%;

  background: inherit;
}


.particle.mini-heart::before {
  top: -5.5px;
  left: 0;
}


.particle.mini-heart::after {
  left: 5.5px;
  top: 0;
}


@keyframes particle-float {

  0% {
    opacity: 0;

    transform:
      translate(0, 0)
      scale(0.65)
      rotate(0deg);
  }


  18% {
    opacity: 0.8;
  }


  100% {
    opacity: 0;

    transform:
      translate(
        var(--move-x),
        var(--move-y)
      )
      scale(1)
      rotate(var(--rotate));
  }

}


/* =========================
   FORM
========================= */

.wrap {
  max-width: 500px;

  margin: auto;

  padding-top: 6vh;
}


.wrap h1 {
  margin-bottom: 38px;
}


label {
  display: block;

  margin-bottom: 20px;

  color: #555963;

  font-size: 13px;
  font-weight: 700;
}


input {
  display: block;

  width: 100%;
  height: 58px;

  margin-top: 8px;

  padding: 0 16px;

  border: 1px solid #e4e5e8;
  border-radius: 17px;

  outline: none;

  background: #f8f8fa;
  color: #111;

  font: inherit;

  font-size: 16px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}


input:focus {
  border-color: #aaaeb5;

  background: #fff;
}


/* =========================
   DATE / TIME CENTER
========================= */

input[type="date"],
input[type="time"] {
  position: relative;

  height: 58px;

  padding-top: 0;
  padding-bottom: 0;

  text-align: center;
  text-align-last: center;

  line-height: normal;
}


input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
  display: flex;

  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  align-items: center;
  justify-content: center;

  text-align: center;
}


input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  display: flex;

  width: 100%;
  height: 100%;

  padding: 0;

  align-items: center;
  justify-content: center;
}


input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  display: flex;

  width: 100%;
  height: 100%;

  align-items: center;
  justify-content: center;
}


input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;

  right: 16px;
  top: 50%;

  margin: 0;

  transform: translateY(-50%);
}


/* =========================
   PRIMARY BUTTON
========================= */

.primary {
  width: 100%;
  height: 60px;

  margin-top: 12px;
  padding: 0 24px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  border: 0;
  border-radius: 999px;

  background: #161719;
  color: #fff;

  font: inherit;

  font-size: 16px;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}


.primary:active {
  transform: scale(0.98);

  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.1);
}


/* =========================
   RESULT
========================= */

.ticket {
  margin-bottom: 24px;

  padding: 7px 24px;

  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      #faf9ff,
      #f0f0ff
    );
}


.ticket div {
  padding: 19px 0;

  border-bottom:
    1px solid rgba(20, 20, 30, 0.08);
}


.ticket div:last-child {
  border-bottom: 0;
}


.ticket small {
  display: block;

  margin-bottom: 5px;

  color: #999ca4;

  font-size: 9px;

  letter-spacing: 0.13em;
}


.ticket strong {
  display: block;

  font-size: 20px;

  word-break: break-word;
}


/* =========================
   AGAIN
========================= */

.again {
  width: 100%;
  height: 50px;

  border: 0;

  background: transparent;

  color: #999;

  font: inherit;

  font-weight: 700;

  cursor: pointer;
}


#share-message {
  min-height: 18px;

  margin: 4px 0 0;

  text-align: center;

  color: #999;

  font-size: 12px;
}


/* =========================
   DESKTOP
========================= */

@media (min-width: 721px) {

  .question h1,
  .wrap h1 {
    font-size: 64px;
  }


  .choices {
    height: 210px;
  }


  .heart-stage {
    width: 210px;
    height: 170px;
  }


  .heart-image {
    width: 170px;
    height: 170px;
  }

}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

  #no,
  #yes,
  .primary,
  input {
    transition-duration: 0.01ms;
  }


  .particle {
    display: none;
  }

}
