body[data-auth-mode] {
  --auth-ink: #16233a;
  --auth-muted: #6f7c90;
  --auth-line: rgba(62, 86, 122, 0.16);
  --auth-cream: #fffaf3;
  --auth-blue: #dcecff;
  --auth-gold: #c7a66c;
  min-height: 100vh;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 13% 18%, rgba(227, 239, 255, 0.96), rgba(227, 239, 255, 0) 33%),
    radial-gradient(circle at 87% 18%, rgba(255, 238, 210, 0.92), rgba(255, 238, 210, 0) 31%),
    linear-gradient(135deg, #f8fbff 0%, #fff9f1 48%, #edf6ff 100%);
}

body[data-auth-mode]::before,
body[data-auth-mode]::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body[data-auth-mode]::before {
  background-image:
    linear-gradient(rgba(42, 75, 118, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 75, 118, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 72%);
}

body[data-auth-mode]::after {
  background:
    radial-gradient(circle at 22% 76%, rgba(199, 166, 108, 0.2), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(129, 168, 217, 0.2), transparent 30%);
  z-index: -3;
}

body[data-auth-mode] .account-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

body[data-auth-mode] .bg-glow {
  opacity: 0.36;
  filter: blur(68px);
}

body[data-auth-mode] .bg-glow-left {
  background: radial-gradient(circle, rgba(151, 192, 231, 0.52), rgba(151, 192, 231, 0));
}

body[data-auth-mode] .bg-glow-right {
  background: radial-gradient(circle, rgba(218, 186, 126, 0.42), rgba(218, 186, 126, 0));
}

body[data-auth-mode] .account-topbar {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.78);
  color: var(--auth-ink);
  box-shadow: 0 18px 58px rgba(48, 77, 112, 0.14);
}

body[data-auth-mode] .brand {
  min-width: auto;
}

body[data-auth-mode] .brand-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, rgba(255, 255, 255, 0.18) 42%),
    linear-gradient(135deg, #173860, #d4af73);
  box-shadow: 0 10px 24px rgba(40, 76, 114, 0.2);
}

body[data-auth-mode] .brand-name {
  color: var(--auth-ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

body[data-auth-mode] .brand-sub {
  color: var(--auth-muted);
}

body[data-auth-mode] .home-link {
  border-color: rgba(42, 74, 116, 0.16);
  background: rgba(255, 255, 255, 0.74);
  color: #263d5b;
}

body[data-auth-mode] .home-link:hover,
body[data-auth-mode] .home-link:focus-visible {
  border-color: rgba(28, 64, 105, 0.36);
  box-shadow: 0 8px 20px rgba(40, 76, 114, 0.12);
}

.auth-main-centered {
  width: min(1180px, calc(100% - 1.5rem));
  margin: clamp(5.4rem, 10vh, 7.1rem) auto 2rem;
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.78fr);
  gap: clamp(1rem, 2.6vw, 1.7rem);
  align-items: stretch;
}

.auth-brand-panel,
.auth-panel-single {
  position: relative;
  min-height: min(650px, calc(100vh - 9.2rem));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 26px 80px rgba(48, 78, 114, 0.16);
  overflow: hidden;
}

.auth-brand-panel {
  border-radius: 34px;
  padding: clamp(1.2rem, 3vw, 2.4rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 250, 243, 0.52)),
    url("./assets/hero-brand/img_brand_a2_w.jpg") center / cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 38%, rgba(255, 255, 255, 0.24) 100%),
    radial-gradient(circle at 68% 30%, rgba(255, 255, 255, 0.52), transparent 28%);
  z-index: -2;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  right: -16%;
  bottom: -16%;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.58);
  z-index: -1;
}

.auth-eyebrow {
  margin: 0;
  color: #6f7b88;
  font-family: "Exo 2", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.auth-brand-panel h2 {
  max-width: 10.5em;
  margin: 0.72rem 0 0;
  color: #22324a;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
  word-break: keep-all;
  overflow-wrap: normal;
}

.auth-brand-panel > p {
  max-width: 38ch;
  margin: 1rem 0 0;
  color: #516078;
  font-size: clamp(0.94rem, 1.35vw, 1.08rem);
  line-height: 1.72;
}

.auth-product-scene {
  position: absolute;
  right: clamp(0.2rem, 3vw, 1.6rem);
  bottom: clamp(5.6rem, 9vw, 7.8rem);
  width: min(44%, 300px);
  height: min(52%, 370px);
  pointer-events: none;
}

.auth-product {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 24px 28px rgba(38, 54, 78, 0.2));
  animation: authFloat 7s ease-in-out infinite;
}

.auth-product-primary {
  right: 20%;
  bottom: 0;
  width: 58%;
  z-index: 3;
}

.auth-product-secondary {
  right: 0;
  bottom: 5%;
  width: 44%;
  opacity: 0.92;
  animation-delay: -1.8s;
}

.auth-product-tertiary {
  right: 48%;
  bottom: 10%;
  width: 42%;
  opacity: 0.88;
  animation-delay: -3.2s;
}

.auth-proof-grid {
  position: relative;
  z-index: 1;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.auth-proof-grid div {
  min-height: 90px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(12px);
}

.auth-proof-grid dt {
  color: #22324a;
  font-family: "Exo 2", sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.auth-proof-grid dd {
  margin: 0.26rem 0 0;
  color: #6d7890;
  font-size: 0.78rem;
  line-height: 1.35;
}

.auth-panel-single {
  border-radius: 30px;
  padding: clamp(1rem, 2.2vw, 1.6rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 255, 0.82)),
    radial-gradient(circle at 100% 0%, rgba(207, 174, 114, 0.16), transparent 32%);
  color: var(--auth-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel-single::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(199, 166, 108, 0.26);
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(236, 219, 185, 0.44), rgba(205, 229, 255, 0.28));
  pointer-events: none;
}

.auth-head-centered {
  position: relative;
  z-index: 1;
  text-align: left;
  margin-bottom: 1.18rem;
}

.auth-head-centered p {
  margin-left: 0;
  margin-right: 0;
}

.auth-head-centered .panel-kicker {
  color: #8b6e3d;
}

.auth-head-centered h1 {
  margin-top: 0.48rem;
  color: #17243a;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-head-centered h1 + p {
  max-width: 30rem;
  color: #627089;
  font-size: 0.96rem;
  line-height: 1.64;
}

.auth-grid-single {
  grid-template-columns: 1fr;
}

.auth-card-single {
  max-width: none;
  margin: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 0;
}

.form-stack {
  gap: 0.8rem;
}

.field-label {
  gap: 0.38rem;
  color: #26384f;
  font-size: 0.86rem;
  font-weight: 800;
}

.field-label input,
.field-label select {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(50, 77, 112, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: #17243a;
  padding: 0.72rem 0.86rem;
  font-size: 0.94rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-label input::placeholder {
  color: #9aa6b8;
}

.field-label input:focus-visible,
.field-label select:focus-visible {
  outline: none;
  border-color: rgba(30, 79, 134, 0.48);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(79, 129, 193, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-primary,
.btn-secondary {
  min-height: 52px;
  border-radius: 999px;
  font-family: "Noto Sans KR", "Noto Sans JP", sans-serif;
}

.btn-primary {
  margin-top: 0.1rem;
  border: 1px solid rgba(20, 50, 88, 0.12);
  background: linear-gradient(135deg, #173860, #315e91 58%, #c7a66c);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 34px rgba(35, 77, 126, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible {
  transform: translateY(-2px);
}

.auth-switch {
  width: 100%;
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  color: #69768b;
  font-size: 0.88rem;
}

.auth-link-btn {
  min-height: 42px;
  padding: 0.52rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(50, 77, 112, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: #1c3f6c;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-link-btn:hover,
.auth-link-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(30, 79, 134, 0.36);
  box-shadow: 0 10px 24px rgba(48, 78, 114, 0.12);
}

.feedback {
  margin: 0.86rem 0 0;
  min-height: 1.2rem;
  color: #69768b;
  font-size: 0.86rem;
}

.feedback.is-success {
  color: #14735c;
}

.feedback.is-error {
  color: #b34040;
}

@keyframes authFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  50% {
    transform: translate3d(0, -12px, 0) rotate(1deg);
  }
}

@media (max-width: 980px) {
  .auth-main-centered {
    width: min(760px, calc(100% - 1.2rem));
  }

  .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel,
  .auth-panel-single {
    min-height: auto;
  }

  .auth-brand-panel {
    min-height: 390px;
  }

  .auth-brand-panel h2 {
    max-width: 13ch;
  }
}

@media (max-width: 640px) {
  body[data-auth-mode] .account-topbar {
    align-items: center;
    border-radius: 24px;
    padding: 0.44rem;
  }

  body[data-auth-mode] .brand-name {
    font-size: 0.82rem;
  }

  body[data-auth-mode] .brand-sub {
    display: none;
  }

  body[data-auth-mode] .home-link {
    min-height: 38px;
    padding: 0.38rem 0.72rem;
    font-size: 0.78rem;
  }

  .auth-main-centered {
    width: calc(100% - 0.82rem);
    margin-top: 5.7rem;
  }

  .auth-stage {
    gap: 0.72rem;
  }

  .auth-brand-panel {
    min-height: 330px;
    border-radius: 24px;
    padding: 1rem;
  }

  .auth-brand-panel h2 {
    max-width: 12ch;
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .auth-brand-panel > p {
    max-width: 24ch;
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .auth-product-scene {
    right: -0.4rem;
    bottom: 4.4rem;
    width: 46%;
    height: 45%;
  }

  .auth-proof-grid {
    grid-template-columns: 1fr;
    gap: 0.38rem;
    max-width: 56%;
    margin-top: 1rem;
  }

  .auth-proof-grid div {
    min-height: auto;
    border-radius: 16px;
    padding: 0.46rem 0.56rem;
  }

  .auth-proof-grid dt {
    font-size: 0.86rem;
  }

  .auth-proof-grid dd {
    font-size: 0.7rem;
  }

  .auth-panel-single {
    border-radius: 24px;
    padding: 1rem;
  }

  .auth-head-centered h1 {
    font-size: 2rem;
  }

  .auth-switch {
    flex-direction: column;
    gap: 0.42rem;
  }

  .auth-link-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .auth-main-centered {
    width: calc(100% - 0.64rem);
  }

  .auth-brand-panel {
    min-height: 305px;
  }

  .field-label input,
  .field-label select,
  .btn-primary,
  .btn-secondary {
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-product,
  .btn-primary,
  .auth-link-btn,
  .home-link {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep auth headers isolated from the homepage navigation redesign. */
body[data-auth-mode] .account-topbar {
  top: max(14px, env(safe-area-inset-top)) !important;
  left: 50% !important;
  right: auto !important;
  width: min(1120px, calc(100% - 40px)) !important;
  min-height: 68px !important;
  height: auto !important;
  display: flex !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 255, 255, .76) !important;
  border-radius: 34px !important;
  background: linear-gradient(120deg, rgba(255, 255, 255, .9), rgba(255, 247, 241, .72)) !important;
  box-shadow: 0 16px 42px rgba(92, 58, 52, .12), inset 0 1px 0 rgba(255, 255, 255, .92) !important;
  backdrop-filter: blur(18px) saturate(1.12) !important;
  overflow: visible !important;
  transform: translateX(-50%) !important;
}

body[data-auth-mode] .account-topbar::before,
body[data-auth-mode] .account-topbar::after {
  display: none !important;
  content: none !important;
}

body[data-auth-mode] .account-topbar .brand {
  position: relative !important;
  width: auto !important;
  min-width: 0 !important;
  height: 48px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: center !important;
  gap: .7rem !important;
  padding: 0 1.05rem 0 .9rem !important;
  border: 1px solid rgba(255, 255, 255, .76) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .68) !important;
  color: var(--auth-ink) !important;
  box-shadow: 0 10px 24px rgba(87, 54, 48, .08), inset 0 1px 0 rgba(255, 255, 255, .88) !important;
  text-decoration: none !important;
  overflow: hidden !important;
}

body[data-auth-mode] .account-topbar .brand::before,
body[data-auth-mode] .account-topbar .brand::after {
  display: none !important;
  content: none !important;
}

body[data-auth-mode] .account-topbar .brand-dot {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 35% 28%, #fff 0%, rgba(255, 255, 255, .42) 38%, transparent 42%),
    linear-gradient(135deg, #173860, #b16483 54%, #d4af73) !important;
  box-shadow: 0 8px 18px rgba(87, 54, 48, .16) !important;
}

body[data-auth-mode] .account-topbar .brand-name {
  margin: 0 !important;
  color: #1f1a1d !important;
  font-family: "Noto Sans KR", "Noto Sans JP", sans-serif !important;
  font-size: .92rem !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  letter-spacing: -.035em !important;
  white-space: nowrap !important;
}

body[data-auth-mode] .account-topbar .brand-sub {
  display: block !important;
  margin: .12rem 0 0 !important;
  color: rgba(31, 26, 29, .56) !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .08em !important;
  white-space: nowrap !important;
}

body[data-auth-mode] .account-topbar .home-link {
  width: auto !important;
  min-width: 0 !important;
  min-height: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  padding: 0 .98rem !important;
  border: 1px solid rgba(42, 74, 116, .16) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .78) !important;
  color: #263d5b !important;
  box-shadow: none !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
}

body[data-auth-mode] .account-topbar .home-link::before,
body[data-auth-mode] .account-topbar .home-link::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 640px) {
  body[data-auth-mode] .account-topbar {
    top: max(8px, env(safe-area-inset-top)) !important;
    width: calc(100% - 20px) !important;
    min-height: 62px !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 24px !important;
  }

  body[data-auth-mode] .account-topbar .brand {
    height: 46px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 0 .72rem !important;
    gap: .54rem !important;
  }

  body[data-auth-mode] .account-topbar .brand-dot {
    width: 27px !important;
    height: 27px !important;
    flex-basis: 27px !important;
  }

  body[data-auth-mode] .account-topbar .brand-name {
    font-size: .8rem !important;
  }

  body[data-auth-mode] .account-topbar .brand-sub {
    display: none !important;
  }

  body[data-auth-mode] .account-topbar .home-link {
    width: auto !important;
    max-width: 42% !important;
    flex: 0 0 auto !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 .72rem !important;
    font-size: .74rem !important;
  }
}

@media (max-width: 380px) {
  body[data-auth-mode] .account-topbar .brand-name {
    max-width: 7.6em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body[data-auth-mode] .account-topbar .home-link {
    padding: 0 .6rem !important;
  }
}

/* Mobile auth flow: show the account/password form before brand storytelling. */
@media (max-width: 760px) {
  body[data-auth-mode] .auth-main-centered {
    width: calc(100% - 20px) !important;
    margin: calc(78px + env(safe-area-inset-top)) auto 1.25rem !important;
  }

  body[data-auth-mode] .auth-stage {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  body[data-auth-mode] .auth-panel-single {
    order: 1 !important;
    min-height: 0 !important;
    border-radius: 26px !important;
    padding: 18px 16px 16px !important;
    justify-content: flex-start !important;
  }

  body[data-auth-mode] .auth-brand-panel {
    order: 2 !important;
    min-height: 260px !important;
    border-radius: 24px !important;
    padding: 18px !important;
  }

  body[data-auth-mode] .auth-head-centered {
    margin-bottom: 14px !important;
  }

  body[data-auth-mode] .auth-head-centered .panel-kicker {
    margin: 0 !important;
    font-size: .72rem !important;
    letter-spacing: .24em !important;
  }

  body[data-auth-mode] .auth-head-centered h1 {
    margin: 6px 0 0 !important;
    font-size: clamp(1.72rem, 9vw, 2.28rem) !important;
    line-height: .98 !important;
  }

  body[data-auth-mode] .auth-head-centered h1 + p {
    margin: 10px 0 0 !important;
    max-width: 100% !important;
    font-size: .86rem !important;
    line-height: 1.45 !important;
  }

  body[data-auth-mode] .form-stack {
    gap: 12px !important;
  }

  body[data-auth-mode] .field-label {
    gap: 6px !important;
    font-size: .82rem !important;
  }

  body[data-auth-mode] .field-label input,
  body[data-auth-mode] .field-label select,
  body[data-auth-mode] .btn-primary,
  body[data-auth-mode] .btn-secondary {
    min-height: 48px !important;
    border-radius: 16px !important;
    font-size: .92rem !important;
  }

  body[data-auth-mode] .auth-switch {
    margin-top: 12px !important;
    gap: 6px !important;
  }

  body[data-auth-mode="login"] .auth-brand-panel {
    max-height: 230px !important;
    overflow: hidden !important;
  }

  body[data-auth-mode="login"] .auth-brand-panel h2 {
    font-size: clamp(1.48rem, 8vw, 2.2rem) !important;
    max-width: 12ch !important;
  }

  body[data-auth-mode="login"] .auth-brand-panel > p {
    max-width: 24ch !important;
    font-size: .82rem !important;
    line-height: 1.48 !important;
  }

  body[data-auth-mode="login"] .auth-proof-grid {
    display: none !important;
  }
}

@media (max-width: 420px) {
  body[data-auth-mode] .auth-main-centered {
    width: calc(100% - 16px) !important;
    margin-top: calc(76px + env(safe-area-inset-top)) !important;
  }

  body[data-auth-mode] .auth-panel-single {
    padding: 16px 14px 14px !important;
  }

  body[data-auth-mode] .auth-head-centered h1 {
    font-size: clamp(1.58rem, 8.4vw, 2.02rem) !important;
  }

  body[data-auth-mode] .auth-head-centered h1 + p {
    font-size: .82rem !important;
  }

  body[data-auth-mode] .field-label input,
  body[data-auth-mode] .field-label select,
  body[data-auth-mode] .btn-primary,
  body[data-auth-mode] .btn-secondary {
    min-height: 46px !important;
  }
}
