@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard-dynamic-subset.min.css");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 100%;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  font-size: 100%;
}

body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  word-break: keep-all;
  color: white;
  background: black;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
}

button {
  cursor: pointer;
}

.button:active {
  transform: scale(.95);
}

.button[aria-disabled="true"] {
  cursor: default;
}

.button[aria-disabled="true"]:active {
  transform: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:lang(ko) .content {
  line-height: 1.625;
}

:lang(en) .content {
  line-height: 1.375;
}

.content > *:not(:last-child) {
  margin-bottom: 1rem;
}

.content ol {
  list-style: none;
}

.content li {
  padding: .75rem 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.icon {
  display: block;
  width: 1em;
  height: 1em;
  stroke-width: 2;
}

.main {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: black;
}

.main.is-dragging {
  cursor: grabbing;
}

.constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.star {
  pointer-events: auto;
  cursor: pointer;
  outline: none;
  opacity: var(--depth-opacity, 1);
}

.star-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1;
}

.star-core {
  fill: white;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1s, opacity .25s;
}

.star:focus-visible,
.star:active {
  opacity: 1;
}

.star:focus-visible .star-core,
.star:active .star-core {
  transform: scale(3);
  transition: transform 0s;
}

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  padding:
    calc(1rem + env(safe-area-inset-top, 0px))
    calc(1.25rem + env(safe-area-inset-right, 0px))
    1rem
    calc(1.25rem + env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, black, transparent), linear-gradient(to bottom, black, transparent), linear-gradient(to bottom, black, transparent);
  pointer-events: none;
}

#button-intro {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  color: white;
  pointer-events: auto;
}

#button-language {
  display: grid;
  place-items: center;
  position: absolute;
  left: calc(.625rem + env(safe-area-inset-left, 0px));
  width: 2.5rem;
  height: 2.5rem;
  color: white;
  font-size: 1rem;
  pointer-events: auto;
}

#button-help {
  display: grid;
  place-items: center;
  position: absolute;
  right: calc(.625rem + env(safe-area-inset-right, 0px));
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  pointer-events: auto;
}

.intro {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding:
    1.25rem
    calc(1.25rem + env(safe-area-inset-right, 0px))
    1.25rem
    calc(1.25rem + env(safe-area-inset-left, 0px));
  color: white;
  text-align: center;
  text-shadow: 0 1px .5rem rgba(0, 0, 0, 1);
  touch-action: pan-y;
  transition:
    opacity .5s,
    transform .5s;
  pointer-events: none;
}

.intro .content {
  pointer-events: auto;
}

.intro.is-hidden {
  opacity: 0;
  transform: translateY(calc(-50% - .5rem));
}

.intro.is-hidden .content {
  pointer-events: none;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  padding:
    1.5rem
    calc(1.25rem + env(safe-area-inset-right, 0px))
    calc(1.5rem + env(safe-area-inset-bottom, 0px))
    calc(1.25rem + env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, transparent, black), linear-gradient(to bottom, transparent, black), linear-gradient(to bottom, transparent, black);
  pointer-events: none;
}

#button-featured {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: calc(1.25rem + env(safe-area-inset-left, 0px));
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  width: 2.5rem;
  height: 2.5rem;
  pointer-events: auto;
}

.footer-featured-dot {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #F49CF3;
}

#button-write {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.5rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  color: black;
  background: rgba(255, 255, 255, .75);
  -webkit-backdrop-filter: blur(.25rem);
  backdrop-filter: blur(.25rem);
  font-weight: 700;
  font-size: .875rem;
  pointer-events: auto;
  transition: opacity .25s;
}

#button-write:active {
  background: rgba(255, 255, 255, 1);
}

.section-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(.25rem);
}

.section {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 21;
  left: 0;
  bottom: 0;
  overflow: auto;
  width: 100%;
  max-height: 75dvh;
  min-height: min(20rem, 75dvh);
  color: black;
  background: white;
  border-radius: 1rem 1rem 0 0;
  animation: rise .25s ease-out;
}

#section-featured {
  background: #F49CF3;
}

.section.is-closing {
  pointer-events: none;
  animation: fall .25s ease-in forwards;
}

.section-header {
  flex: 0 0 auto;
  position: sticky;
  z-index: 1;
  top: 0;
  padding:
    1rem
    calc(1rem + env(safe-area-inset-right, 0px))
    1rem
    calc(1rem + env(safe-area-inset-left, 0px));
  background: inherit;
}

.section-title {
  font-weight: 700;
  text-align: center;
}

[data-close] {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 2;
  top: .5rem;
  right: calc(.5rem + env(safe-area-inset-right, 0px));
  width: 2.5rem;
  height: 2.5rem;
  font-size: .875rem;
}

[data-close]::before {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, .1);
}

[data-close] .icon {
  position: relative;
}

.section-main {
  flex: 1 1 auto;
  padding:
    1rem
    calc(1rem + env(safe-area-inset-right, 0px))
    calc(1.5rem + env(safe-area-inset-bottom, 0px))
    calc(1rem + env(safe-area-inset-left, 0px));
}

#read-text {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.375;
}

.section-read time {
  color: rgba(0, 0, 0, .5);
  font-size: .75rem;
}

.message-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  text-align: center;
}

.message-author {
  font-size: .75rem;
  font-weight: 700;
}

.featured-messages {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.featured-message {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.featured-message:first-child {
  padding-top: 0;
  border-top: 0;
}

.featured-message p {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.375;
}

.form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.field-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.input,
.textarea {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: .5rem .75rem;
  color: black;
  background: rgba(0, 0, 0, .05);
  border: 1px solid rgba(0, 0, 0, .05);
  border-radius: .125rem;
  outline: 0;
}

.input:focus,
.textarea:focus {
  border-color: rgba(0, 0, 0, .1);
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(0, 0, 0, .25);
}

.textarea {
  min-height: 10rem;
  resize: none;
}

.field-help {
  font-size: .75rem;
  font-variant: tabular-nums;
  text-align: right;
  color: rgba(0, 0, 0, .5);
}

#button-submit {
  width: 100%;
  min-height: 2.5rem;
  padding: .5rem .75rem;
  border-radius: 999px;
  background: black;
  color: white;
  font-weight: 700;
}

@media (hover: hover) {
  .star:hover {
    opacity: 1;
  }

  .star:hover .star-core {
    transform: scale(3);
    transition: transform 0s;
  }

  #button-write:hover {
    background: rgba(255, 255, 255, 1);
  }
}

#button-submit:disabled,
#button-submit[aria-disabled="true"] {
  opacity: .45;
  cursor: wait;
}

.form-error {
  margin: .625rem 0 0;
  color: rgba(0, 0, 0, .7);
  font-size: .6875rem;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, .75rem);
  padding: .5rem 1rem;
  border-radius: 999px;
  background: white;
  color: black;
  font-size: .875rem;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .2s,
    transform .2s;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.error-page {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 2rem;
  background: black;
}

.error-page main {
  max-width: 26.25rem;
  text-align: center;
}

.error-page p {
  margin: 0 0 1.125rem;
  color: rgba(255, 255, 255, .55);
  font-size: .6875rem;
  letter-spacing: .18em;
}

.error-page h1 {
  margin: 0 0 2rem;
  font-size: 1.875rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -.04em;
}

.error-page a {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  padding: 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 62.4375rem;
  color: white;
  text-decoration: none;
}

@keyframes rise {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fall {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
