:root {
  --auth-ink: #4b2928;
  --auth-soft: #6c4f4c;
  --auth-rose: #df687c;
  --auth-deep: #c94e68;
  --auth-petal: #fff6f4;
  --auth-gold: #d6a32b;
  --auth-serif: "Noto Serif JP", "Yu Mincho", serif;
  --auth-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}

* {
  box-sizing: border-box;
}

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

.auth-page {
  min-height: 100svh;
  overflow: hidden;
  color: var(--auth-ink);
  background: #fffaf9;
  font-family: var(--auth-sans);
  -webkit-font-smoothing: antialiased;
}

.auth-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 55%, rgba(214, 163, 43, .16), transparent 31%),
    radial-gradient(circle at 82% 49%, rgba(223, 104, 124, .16), transparent 34%),
    linear-gradient(135deg, #fffdfc 0%, var(--auth-petal) 48%, #fce9ed 100%);
}

.auth-screen::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 68%, rgba(75, 41, 40, .08) 100%),
    radial-gradient(ellipse at center 95%, rgba(255, 255, 255, .82), rgba(255, 255, 255, 0) 48%);
  content: "";
  pointer-events: none;
}

.auth-gradient {
  position: absolute;
  inset: -25%;
  z-index: 0;
  overflow: hidden;
  opacity: .34;
  pointer-events: none;
}

.auth-gradient-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  animation: authBlobRotate 32s linear infinite;
}

.auth-gradient-blob::before {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.auth-gradient-blob:nth-child(1)::before {
  top: -40vmax;
  left: -34vmax;
  width: 62vmax;
  height: 62vmax;
  background: radial-gradient(circle, rgba(223, 104, 124, .28), rgba(223, 104, 124, 0) 70%);
}

.auth-gradient-blob:nth-child(2) {
  animation-duration: 27s;
  animation-direction: reverse;
}

.auth-gradient-blob:nth-child(2)::before {
  top: -7vmax;
  left: 8vmax;
  width: 54vmax;
  height: 54vmax;
  background: radial-gradient(circle, rgba(244, 173, 185, .3), rgba(244, 173, 185, 0) 72%);
}

.auth-gradient-blob:nth-child(3) {
  animation-duration: 24s;
}

.auth-gradient-blob:nth-child(3)::before {
  top: 14vmax;
  left: -8vmax;
  width: 46vmax;
  height: 46vmax;
  background: radial-gradient(circle, rgba(214, 163, 43, .2), rgba(214, 163, 43, 0) 72%);
}

.auth-content,
.auth-visual {
  position: absolute;
  inset: 0;
}

.auth-content {
  z-index: 2;
}

.auth-visual {
  bottom: calc(104px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 24px;
}

.auth-main-image {
  display: block;
  width: auto;
  max-width: min(82vw, 720px);
  height: min(92%, 900px);
  max-height: 92%;
  object-fit: contain;
  object-position: center;
  filter: saturate(.96) drop-shadow(0 20px 28px rgba(75, 41, 40, .09));
  animation: imageFadeIn .8s ease-out both;
}

.auth-actions {
  position: absolute;
  z-index: 3;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100% - 32px), 430px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.auth-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 999px;
  font-family: var(--auth-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.auth-button:hover {
  transform: translateY(-2px);
}

.auth-exit {
  color: var(--auth-soft);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(223, 104, 124, .5);
  box-shadow: 0 10px 25px rgba(75, 41, 40, .11);
}

.auth-enter {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-rose), var(--auth-deep));
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 11px 26px rgba(201, 78, 104, .3), inset 0 0 0 3px rgba(255, 255, 255, .1);
}

.auth-button:focus-visible {
  outline: 3px solid rgba(214, 163, 43, .6);
  outline-offset: 4px;
}

.auth-age-note {
  width: 100%;
  margin: 9px 0 0;
  padding: 2px 4px 0;
  color: var(--auth-soft);
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

@keyframes imageFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@keyframes authBlobRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .auth-gradient {
    opacity: .3;
  }

  .auth-actions {
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: calc(100% - 20px);
  }

  .auth-visual {
    bottom: calc(100px + env(safe-area-inset-bottom));
    padding-inline: 8px;
  }

  .auth-main-image {
    max-width: 112vw;
    height: min(94%, 760px);
    max-height: 94%;
  }

  .auth-button {
    min-height: 52px;
    padding-inline: 12px;
  }

  .auth-age-note {
    font-size: 9px;
  }
}

@media (max-height: 650px) {
  .auth-visual {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .auth-main-image {
    height: 96%;
    max-height: 96%;
  }

  .auth-actions {
    bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .auth-button {
    min-height: 46px;
  }

  .auth-age-note {
    margin-top: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gradient-blob,
  .auth-main-image {
    animation: none;
  }

  .auth-button {
    transition: none;
  }
}
