:root {
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: #17221f;
  background: #f5f3ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.redirect-page-body {
  height: 100dvh;
  min-height: 100dvh;
  align-items: start;
  overflow: hidden;
}

main {
  width: min(100%, 520px);
  padding: 32px;
  border: 1px solid #d9d5c7;
  border-radius: 24px;
  background: #fffef9;
  box-shadow: 0 18px 50px rgba(34, 58, 50, .1);
}

.brand { color: #173f35; font-weight: 900; letter-spacing: -.04em; }
h1 { margin: 18px 0 10px; font-size: clamp(26px, 6vw, 38px); letter-spacing: -.05em; }
p { color: #5b655f; line-height: 1.65; word-break: break-all; }
label { display: block; margin: 22px 0 8px; font-weight: 800; }
input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #bfc6c1;
  border-radius: 12px;
  font: inherit;
}
button, .button {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  background: #173f35;
  color: white;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.secondary { background: #eeeadd; color: #173f35; }
.notice { padding: 12px 14px; border-radius: 12px; background: #fff4ce; color: #5b4810; }

.redirect-page { width: min(100%, 520px); max-height: calc(100dvh - 48px); overflow: hidden; }
.redirect-page h1 { margin-bottom: 20px; }
.shared-context {
  margin: -7px 0 18px;
  border-radius: 13px;
  padding: 12px 14px;
  background: #edf4f0;
  color: #52615b;
  font-size: 13px;
  line-height: 1.55;
  word-break: keep-all;
}
.shared-context strong { color: #173f35; }
.shared-context span { color: #173f35; font-weight: 750; word-break: break-all; }
.destination-block { display: grid; gap: 7px; margin-bottom: 18px; }
.destination-block > strong, .expires > strong { color: #3f4d47; font-size: 13px; }
.destination-url {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #173f35;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.5;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.expires { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.redirect-page .button { margin-top: 10px; }
.redirect-now {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #eeeadd;
  color: #173f35;
}
.redirect-now.is-waiting { cursor: wait; }
.redirect-now::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -24% -8% -18%;
  background: #173f35;
  clip-path: polygon(
    0 27%, 9% 22%, 18% 24%, 27% 30%, 37% 31%, 47% 27%,
    57% 20%, 67% 18%, 77% 21%, 88% 27%, 100% 25%, 100% 100%, 0 100%
  );
  transform: translate3d(-3%, 100%, 0);
  animation: redirect-tide 2s linear forwards;
  will-change: transform;
}
.redirect-now > span {
  position: relative;
  z-index: 1;
  animation: redirect-label 2s linear forwards;
}

@keyframes redirect-tide {
  0% { transform: translate3d(-3%, 100%, 0); }
  25% { transform: translate3d(2%, 68%, 0); }
  50% { transform: translate3d(-2%, 32%, 0); }
  75% { transform: translate3d(2%, 8%, 0); }
  100% { transform: translate3d(0, -18%, 0); }
}

@keyframes redirect-label {
  0%, 48% { color: #173f35; }
  68%, 100% { color: #fff; }
}

@media (max-width: 520px) {
  body { min-height: 100dvh; padding: 10px; }
  .redirect-page {
    max-height: calc(100dvh - 20px);
    overflow: hidden;
    border-radius: 20px;
    padding: 20px 18px;
  }
  .redirect-page .brand { font-size: 14px; }
  .redirect-page h1 { margin: 10px 0 13px; font-size: 27px; }
  .shared-context { margin: -3px 0 10px; padding: 9px 11px; font-size: 11px; }
  .destination-block { gap: 4px; margin-bottom: 9px; }
  .destination-url { font-size: 13px; }
  .expires { margin: 9px 0 2px; font-size: 12px; }
  .redirect-page .button { min-height: 46px; margin-top: 8px; padding: 10px 14px; }
}

