/* Fancy auth — login / register / verify */

.flj-auth-page {
  overflow-y: auto;
  min-height: var(--flj-vh);
}

.flj-auth-page .page-wrap {
  min-height: var(--flj-vh);
  overflow: visible;
}

.flj-auth-page .page-wrap > footer { display: none; }
.flj-auth-page .flj-flash-stack { display: none; }
.flj-auth-page .site-main--auth {
  padding-top: var(--flj-nav-h) !important;
  min-height: var(--flj-vh) !important;
  max-width: none !important;
  overflow: visible;
}

.auth-scene {
  position: relative;
  min-height: var(--flj-fill-h);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  overflow: visible;
  background: #060714;
}

/* ── Visual panel ─────────────────────────────────────────────── */
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 56px 56px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-visual-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 20% 15%, rgba(255, 101, 132, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 45% at 85% 70%, rgba(0, 245, 212, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 35% at 50% 100%, rgba(124, 58, 237, 0.15), transparent 55%);
  animation: authAurora 14s ease-in-out infinite alternate;
}
@keyframes authAurora {
  0%   { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}

.auth-visual-moon {
  position: absolute;
  top: 12%;
  right: 18%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f4f7ff, #c8d4e8 55%, transparent 56%);
  box-shadow: 0 0 60px rgba(200, 212, 232, 0.25);
  opacity: 0.9;
  animation: authMoonFloat 8s ease-in-out infinite;
}
@keyframes authMoonFloat {
  50% { transform: translateY(-8px); }
}

.auth-torii {
  position: absolute;
  left: 50%;
  bottom: 28%;
  transform: translateX(-50%);
  width: 220px;
  height: 140px;
  pointer-events: none;
}
.auth-torii-pillar {
  position: absolute;
  bottom: 0;
  width: 18px;
  height: 100px;
  background: linear-gradient(180deg, #ff3355, #c41e3a);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 24px rgba(255, 51, 85, 0.35);
}
.auth-torii-pillar--l { left: 28px; }
.auth-torii-pillar--r { right: 28px; }
.auth-torii-kasagi {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(180deg, #1a1a1a, #0a0a0a);
  border-radius: 8px 8px 2px 2px;
  transform: perspective(200px) rotateX(8deg);
}
.auth-torii-nuki {
  position: absolute;
  top: 36px;
  left: 24px;
  right: 24px;
  height: 10px;
  background: linear-gradient(180deg, #ee2233, #bb1122);
  border-radius: 2px;
}
.auth-torii-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(255, 101, 132, 0.35), transparent 70%);
  animation: authToriiGlow 3s ease-in-out infinite;
}
@keyframes authToriiGlow {
  50% { opacity: 0.6; transform: translateX(-50%) scale(1.1); }
}

.auth-kana-orbit {
  position: absolute;
  inset: 18% 10% auto;
  height: 200px;
  pointer-events: none;
}
.auth-kana-chip {
  position: absolute;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.12);
  text-shadow: 0 0 20px rgba(255, 101, 132, 0.2);
  animation: authKanaFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.9s);
}
.auth-kana-chip:nth-child(1) { left: 8%; top: 10%; }
.auth-kana-chip:nth-child(2) { left: 28%; top: 55%; font-size: 1.6rem; color: rgba(0, 245, 212, 0.15); }
.auth-kana-chip:nth-child(3) { left: 52%; top: 8%; }
.auth-kana-chip:nth-child(4) { left: 72%; top: 42%; }
.auth-kana-chip:nth-child(5) { left: 88%; top: 18%; font-size: 1.1rem; }
.auth-kana-chip:nth-child(6) { left: 42%; top: 78%; color: rgba(255, 101, 132, 0.18); }
@keyframes authKanaFloat {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(-12px); opacity: 1; }
}

.auth-hero-avatar {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin-bottom: 24px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(6, 7, 20, 0.5);
  border: 1px solid rgba(180, 120, 60, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 32px rgba(180, 120, 60, 0.12);
  animation: authAvatarIn 0.8s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.auth-hero-avatar img {
  display: block;
  width: 100px;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  object-position: center bottom;
}
.auth-hero-rank {
  display: block;
  margin-top: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a66b;
  text-align: center;
}
@keyframes authAvatarIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}

.auth-visual-copy {
  position: relative;
  z-index: 2;
  max-width: 420px;
}
.auth-visual-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sakura, #ff6584);
  margin: 0 0 10px;
}
.auth-visual-title {
  font-family: 'Noto Sans JP', 'Nunito', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 12px;
}
.auth-visual-sub {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #9aa3c0;
  margin: 0 0 22px;
}

.auth-rank-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(6, 7, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
.auth-rank-step {
  font-size: 0.62rem;
  font-weight: 700;
  color: #666;
  white-space: nowrap;
}
.auth-rank-step em {
  font-style: normal;
  font-family: 'Noto Sans JP', sans-serif;
  color: #888;
}
.auth-rank-step.is-active {
  color: #c9a66b;
}
.auth-rank-step.is-active em { color: #e8c080; }
.auth-rank-step--gold { color: #d4a820; }
.auth-rank-step--gold em { color: #f0d080; }
.auth-rank-arrow {
  font-size: 0.55rem;
  color: #444;
}

.auth-sakura-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.auth-petal {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 12px;
  background: radial-gradient(ellipse, #ffc0d0 0%, #ff8fab 70%, transparent 72%);
  border-radius: 50% 50% 50% 0;
  opacity: 0.75;
  animation: authPetalFall linear forwards;
}
@keyframes authPetalFall {
  to {
    transform: translateY(calc(var(--flj-vh) + 40px)) rotate(720deg);
    opacity: 0.2;
  }
}

/* ── Form panel ───────────────────────────────────────────────── */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px 56px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 101, 132, 0.06), transparent),
    #080a14;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 32px;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(20, 22, 44, 0.92), rgba(8, 10, 18, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 101, 132, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  animation: authCardIn 0.65s cubic-bezier(0.34, 1.15, 0.64, 1) both;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--red, #e63946), var(--sakura, #ff6584), var(--mint, #00f5d4));
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.auth-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 12px 5px 8px;
  border-radius: 100px;
  background: rgba(255, 101, 132, 0.1);
  border: 1px solid rgba(255, 101, 132, 0.25);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sakura, #ff6584);
}
.auth-card-badge-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fff, var(--sakura, #ff6584));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0;
  text-transform: none;
}

.auth-card-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.2;
}
.auth-card-sub {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #888;
  margin: 0 0 26px;
}
.auth-card-sub strong { color: #ddd; font-weight: 600; }

.auth-perks {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.auth-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9aa3c0;
}
.auth-perk-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.2);
  flex-shrink: 0;
}
.auth-perk-icon--xp::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--mint, #00f5d4);
  transform: rotate(45deg);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(0, 245, 212, 0.5);
}

.auth-field {
  margin-bottom: 16px;
}

.auth-gender-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-gender-option {
  cursor: pointer;
}

.auth-gender-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-gender-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 14px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-gender-card img {
  width: 72px;
  height: 100px;
  object-fit: contain;
  object-position: bottom center;
  border-radius: 8px;
}

.auth-gender-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.auth-gender-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #9aa3c0;
  letter-spacing: 0.04em;
}

.auth-gender-option.is-selected .auth-gender-card,
.auth-gender-option:has(.auth-gender-input:checked) .auth-gender-card {
  border-color: rgba(255, 101, 132, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 101, 132, 0.14), 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.auth-gender-option:hover .auth-gender-card {
  border-color: rgba(255, 255, 255, 0.22);
}
.auth-field label,
.login-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap .login-input {
  width: 100%;
  padding: 12px 14px 12px 40px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}
.auth-input-wrap .login-input:focus {
  border-color: rgba(255, 101, 132, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(255, 101, 132, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25) !important;
  background: rgba(0, 0, 0, 0.5) !important;
  outline: none !important;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.45;
  pointer-events: none;
}
.auth-input-wrap:focus-within .auth-input-icon { opacity: 0.85; }

.auth-card .login-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px 20px !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--red, #e63946), var(--sakura, #ff6584)) !important;
  box-shadow: 0 8px 28px rgba(230, 57, 70, 0.4) !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.auth-card .login-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.auth-card .login-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 36px rgba(230, 57, 70, 0.5) !important;
}
.auth-card .login-btn:hover::after { transform: translateX(100%); }

.auth-card .login-check {
  margin: 8px 0 12px;
  font-size: 0.78rem;
}
.auth-card .login-check input {
  accent-color: var(--sakura, #ff6584);
  width: 16px;
  height: 16px;
}

.auth-card .login-err[style*="display:block"],
.auth-card .login-err[style*="display: block"] {
  margin-bottom: 14px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.auth-card .login-alt {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}
.auth-card .login-alt a {
  color: var(--mint, #00f5d4);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 245, 212, 0.3);
  transition: color 0.2s, border-color 0.2s;
}
.auth-card .login-alt a:hover {
  color: #fff;
  border-color: var(--mint, #00f5d4);
}
.auth-back-home {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 0.72rem;
  color: #555 !important;
  text-decoration: none;
}
.auth-back-home:hover { color: #999 !important; }

.auth-pw-meter {
  height: 3px;
  margin-top: 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.auth-pw-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--mint, #00f5d4);
  transition: width 0.25s, background 0.25s;
}

/* OTP on verify */
.auth-card .flj-otp {
  margin-bottom: 20px;
}
.auth-card .flj-otp-cell {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  font-size: 1.4rem !important;
}
.auth-card .flj-otp-cell:focus {
  border-color: var(--sakura, #ff6584) !important;
  box-shadow: 0 0 0 3px rgba(255, 101, 132, 0.15) !important;
}

@media (max-width: 960px) {
  .auth-scene {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    min-height: 220px;
    padding: 32px 24px 28px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .auth-torii { transform: translateX(-50%) scale(0.7); bottom: 8%; opacity: 0.7; }
  .auth-visual-moon { width: 48px; height: 48px; top: 16%; right: 12%; }
  .auth-kana-orbit { display: none; }
  .auth-hero-avatar {
    position: absolute;
    right: 20px;
    top: 24px;
    margin: 0;
    padding: 6px;
  }
  .auth-hero-avatar img { width: 64px; }
  .auth-hero-rank { font-size: 0.55rem; }
  .auth-visual-title { font-size: 1.35rem; }
  .auth-rank-path { display: none; }
  .auth-panel { padding: 28px 20px 48px; }
  .auth-card { padding: 28px 22px 24px; }
}

.auth-recaptcha-note {
  margin-top: 18px;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #666;
  text-align: center;
}
.auth-recaptcha-note a {
  color: #888;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-recaptcha-note a:hover { color: var(--mint, #00f5d4); }

@media (prefers-reduced-motion: reduce) {
  .auth-visual-aurora,
  .auth-visual-moon,
  .auth-torii-glow,
  .auth-kana-chip,
  .auth-petal,
  .auth-card,
  .auth-hero-avatar { animation: none !important; }
}