:root {
  --black: #000;
  --white: #fff;
  --line: #000;
  --muted: #f6f6f6;
  --red: #ff0004;
  --yellow: #ffc925;
  --blue: #2ac3ff;
  --link-blue: #2778f6;
  --page-width: 402px;
  --side: 24px;
  --divider-y: 249px;
  --divider-thickness: 10px;
  color: var(--black);
  background: var(--white);
  font-family: Inter, "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis-weight: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--white);
}

body[data-route="/"],
body[data-route="/"] #app {
  background: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.site-shell {
  min-height: 100dvh;
  width: 100%;
  background: var(--white);
}

.site-shell--black {
  background: var(--black);
}

.screen {
  min-height: 100dvh;
  width: min(100%, var(--page-width));
  margin: 0 auto;
  position: relative;
  overflow: visible;
}

@keyframes enterFromTop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dividerReveal {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes centeredEnterFromTop {
  from {
    opacity: 0;
    transform: translate(-50%, -18px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fireworkPop {
  0%,
  18% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }

  30% {
    opacity: 1;
  }

  72% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.15) rotate(28deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.15) rotate(28deg);
  }
}

.cjy-mark--home,
.page-header > *,
.home-menu .row-link,
.list-menu .row-link,
.legal-content > *,
.invite-code-card {
  animation: enterFromTop 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.home-screen::before,
.page-header::after {
  animation: dividerReveal 560ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both;
  transform-origin: center;
}

.cjy-mark--home,
.page-header > *,
.musicnow-logo--invite {
  animation-delay: 40ms;
}

.invite-title {
  animation-delay: 120ms;
}

.home-menu .row-link:nth-child(1),
.list-menu .row-link:nth-child(1),
.invite-code-card,
.legal-content > *:nth-child(1) {
  animation-delay: 180ms;
}

.home-menu .row-link:nth-child(2),
.list-menu .row-link:nth-child(2),
.invite-instruction,
.legal-content > *:nth-child(2) {
  animation-delay: 260ms;
}

.list-menu .row-link:nth-child(3),
.app-store-button,
.legal-content > *:nth-child(3) {
  animation-delay: 340ms;
}

.legal-content > *:nth-child(4) {
  animation-delay: 420ms;
}

.legal-content > *:nth-child(5) {
  animation-delay: 500ms;
}

.legal-content > *:nth-child(n + 6) {
  animation-delay: 580ms;
}

.home-screen {
  color: var(--white);
  background: var(--black);
}

.home-screen::before {
  content: "";
  display: none;
  position: absolute;
  top: calc(var(--divider-y) - var(--divider-thickness) / 2);
  left: 50%;
  width: 100vw;
  height: var(--divider-thickness);
  transform: translateX(-50%);
  background: var(--white);
  pointer-events: none;
}

.cjy-mark {
  margin: 0;
  line-height: 0;
}

.cjy-mark--home {
  position: absolute;
  top: 76px;
  left: var(--side);
  width: min(calc(100% - 48px), 354px);
}

.cjy-mark__image {
  display: block;
  width: 100%;
  height: auto;
}

.home-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 331px;
}

.home-menu .row-link {
  height: 58px;
  min-height: 58px;
  margin-bottom: 46px;
  font-size: 48px;
  line-height: 58px;
}

.home-menu .row-link:last-child {
  margin-bottom: 0;
}

.page-header {
  height: var(--divider-y);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  top: calc(var(--divider-y) - var(--divider-thickness) / 2);
  left: 50%;
  width: 100vw;
  height: var(--divider-thickness);
  transform: translateX(-50%);
  background: var(--line);
  pointer-events: none;
}

.page-header--left {
  justify-content: flex-start;
  padding-left: 25px;
}

.page-title,
.musicnow-logo {
  margin: 0;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-title {
  font-size: clamp(3.5rem, 15.9vw, 4rem);
}

.musicnow-logo {
  color: var(--black);
  white-space: nowrap;
}

.musicnow-logo--large {
  font-size: clamp(3.25rem, 15.9vw, 4rem);
}

.musicnow-logo--invite {
  position: absolute;
  top: 109px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 36px;
  line-height: 44px;
}

.tone-red {
  color: var(--red);
}

.tone-yellow {
  color: var(--yellow);
}

.tone-blue {
  color: var(--blue);
}

.list-menu {
  padding-top: 72px;
}

.row-link {
  width: 100%;
  border: 0;
  background: transparent;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--side);
  font-size: clamp(2.7rem, 11.9vw, 3rem);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.row-link:focus-visible,
.app-store-button:focus-visible,
.invite-code-card:focus-visible,
.support-card:focus-visible {
  outline: 3px solid var(--link-blue);
  outline-offset: 4px;
}

.row-link:hover {
  opacity: 0.72;
}

.row-link:active {
  transform: translateY(1px);
}

.row-link--light {
  color: var(--white);
}

.chevron {
  width: 31px;
  height: 31px;
  border-top: 6px solid currentColor;
  border-right: 6px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
  margin-right: 22px;
}

.external-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.18;
  flex: 0 0 auto;
  margin-right: 12px;
}

.contact-link {
  position: relative;
  justify-content: flex-start;
}

.contact-link span {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.contact-copy::after {
  content: "복사 완료!";
  position: absolute;
  top: -4px;
  left: var(--side);
  width: 100px;
  height: 33px;
  border-radius: 30px;
  background: var(--link-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.contact-copy.is-copied::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.legal-screen {
  overflow: visible;
}

.legal-content {
  padding: 34px var(--side) 72px;
}

.updated {
  margin: 0 0 32px;
  font-size: 13px;
  line-height: 1.4;
  color: #5f5f5f;
}

.policy-section {
  margin: 0 0 32px;
}

.policy-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 850;
}

.policy-section p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.72;
  font-weight: 650;
  color: #1d1d1f;
  word-break: keep-all;
}

.support-card {
  display: grid;
  gap: 6px;
  padding: 20px;
  margin: 0 0 32px;
  border: 1px solid var(--black);
  border-radius: 8px;
}

.support-card__label {
  font-size: 13px;
  font-weight: 800;
  color: #666;
}

.support-card__value {
  font-size: 22px;
  font-weight: 850;
}

.invite-screen {
  min-height: 100dvh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 4dvh, 38px);
  padding: max(34px, env(safe-area-inset-top)) clamp(24px, 8vw, 53px) max(24px, env(safe-area-inset-bottom));
}

.musicnow-logo--invite {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  flex: 0 0 auto;
  font-size: clamp(2rem, 9vw, 2.25rem);
  line-height: 1.22;
  margin-top: clamp(28px, 8dvh, 75px);
}

.invite-title {
  position: relative;
  width: min(236px, 100%);
  margin: 0;
  color: var(--black);
  font-size: clamp(2rem, 9vw, 2.25rem);
  font-weight: 850;
  line-height: 1.12;
  text-align: center;
  word-break: keep-all;
}

.invite-title__text {
  position: relative;
  z-index: 1;
}

.fireworks {
  position: absolute;
  inset: -54px -44px -38px;
  pointer-events: none;
}

.firework {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  opacity: 0;
  animation: fireworkPop 1800ms ease-out infinite both;
}

.firework::before,
.firework::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.firework::before {
  background: var(--red);
  box-shadow:
    0 -28px 0 var(--yellow),
    22px -19px 0 var(--blue),
    29px 0 0 var(--red),
    20px 20px 0 var(--yellow),
    0 29px 0 var(--blue),
    -21px 19px 0 var(--red),
    -29px 0 0 var(--yellow),
    -20px -20px 0 var(--blue);
}

.firework::after {
  background: var(--blue);
  transform: rotate(22deg) scale(0.72);
  box-shadow:
    0 -24px 0 var(--red),
    18px -17px 0 var(--yellow),
    25px 0 0 var(--blue),
    17px 18px 0 var(--red),
    0 25px 0 var(--yellow),
    -18px 17px 0 var(--blue),
    -25px 0 0 var(--red),
    -17px -18px 0 var(--yellow);
}

.firework--one {
  top: 18px;
  left: 19px;
}

.firework--two {
  top: 1px;
  right: 18px;
  animation-delay: 520ms;
}

.firework--three {
  right: 46px;
  bottom: 9px;
  animation-delay: 1040ms;
}

.invite-code-card {
  position: relative;
  width: 100%;
  max-width: 296px;
  min-height: clamp(72px, 11dvh, 78px);
  border: 0;
  border-radius: 15px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 clamp(20px, 7vw, 29px);
  cursor: pointer;
}

.invite-code-card::after {
  content: "복사 완료!";
  position: absolute;
  top: -14px;
  right: -10px;
  width: 100px;
  height: 33px;
  border-radius: 30px;
  background: var(--link-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.invite-code-card.is-copied::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.invite-code {
  min-width: 0;
  font-size: clamp(1.7rem, 7.95vw, 2rem);
  font-weight: 850;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
}

.invite-instruction {
  position: relative;
  width: min(288px, 100%);
  margin: 0;
  display: grid;
  gap: 0;
  font-size: clamp(1.375rem, 6vw, 1.5rem);
  font-weight: 850;
  line-height: clamp(2rem, 8.8dvh, 2.5rem);
  text-align: center;
  word-break: keep-all;
}

.app-store-button {
  position: relative;
  width: min(280px, 100%);
  min-height: clamp(88px, 14dvh, 97px);
  border: 2px solid #767676;
  border-radius: 15px;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 24px 14px 86px;
  font-weight: 500;
  line-height: 1.05;
  overflow: hidden;
}

.app-store-button::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 23px;
  width: 44px;
  height: 48px;
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: 48px;
  line-height: 1;
}

.app-store-button span {
  font-size: 19px;
}

.app-store-button strong {
  font-size: 34px;
  font-weight: 650;
}

.musicnow-logo--invite,
.invite-title,
.invite-instruction,
.app-store-button {
  animation: enterFromTop 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@media (min-width: 768px) {
  :root {
    --page-width: 1440px;
    --side: 38px;
    --divider-y: 268px;
  }

  .screen {
    min-height: 100dvh;
  }

  .cjy-mark--home {
    top: 24px;
    width: 520px;
  }

  .home-screen::before {
    display: block;
    top: calc(var(--divider-y) - var(--divider-thickness) / 2);
  }

  .home-menu {
    top: 314px;
  }

  .home-menu .row-link {
    height: 116px;
    min-height: 116px;
    margin-bottom: 46px;
    font-size: 96px;
    font-weight: 950;
    line-height: 116px;
  }

  .home-menu .chevron {
    width: 28px;
    height: 28px;
    border-width: 7px;
    margin-right: 39px;
  }

  .page-header {
    height: var(--divider-y);
    justify-content: flex-start;
    padding-left: 38px;
    padding-top: 67px;
  }

  .page-header--left {
    padding-left: 38px;
  }

  .page-title,
  .musicnow-logo--large {
    font-size: 128px;
  }

  .list-menu {
    padding-top: 46px;
  }

  .row-link {
    height: 116px;
    min-height: 116px;
    margin-bottom: 46px;
    font-size: 96px;
    font-weight: 950;
    line-height: 116px;
  }

  .row-link:last-child {
    margin-bottom: 0;
  }

  .chevron {
    width: 28px;
    height: 28px;
    border-width: 7px;
    margin-right: 39px;
  }

  .legal-content {
    max-width: 640px;
  }

  .invite-screen {
    width: 402px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
