/**
 * 로그인·회원가입·auth-action — 몰 편집샵 톤
 * 화이트 매트 · 헤어라인 · 직각 · 차콜 CTA
 */

:root {
  --auth-editorial-line: rgba(15, 22, 18, 0.08);
  --auth-editorial-line-strong: rgba(15, 22, 18, 0.12);
  --auth-editorial-muted: rgba(53, 58, 66, 0.62);
  --auth-editorial-ink: #353a42;
  --auth-editorial-charcoal: #353a42;
  --auth-editorial-paper: #f7f5f2;
  --auth-editorial-paper-soft: #fafaf9;
}

/* ── 페이지 분위기 — 웜 뉴트럴 (녹색 그라데이션·2열 레이아웃 없음) ── */

html:has(#authGate:not(.hidden)) body {
  background-color: var(--auth-editorial-paper);
  background-image: linear-gradient(
    168deg,
    #f0efec 0%,
    var(--auth-editorial-paper-soft) 38%,
    #ffffff 100%
  );
}

#authGate.auth-gate {
  background: transparent;
}

/* kinetic orb 제거(2026-07-01) — 카드 밖 overflow 허용 불필요 */
#authGate:not(.hidden) {
  overflow: visible;
}

#authGate:not(.hidden) .auth-gate-main {
  overflow-x: visible;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── 카드 — 단순 화이트 매트 · 호버 시 CTA와 동일 테두리만 강조 ── */

#authGate .auth-card,
.auth-action-page .auth-card--action {
  position: relative;
  border-radius: 0;
  border: 1px solid rgba(20, 24, 22, 0.12);
  background: #fff;
  box-shadow: none;
  padding: clamp(28px, 5vw, 36px) clamp(26px, 4.5vw, 34px) clamp(26px, 4vw, 32px);
  transition:
    border-color var(--dur-1, 0.18s) var(--ease-soft, ease),
    box-shadow var(--dur-1, 0.18s) var(--ease-soft, ease);
}

#authGate:not(.hidden) .auth-card {
  animation: auth-card-enter 0.55s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes auth-card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#authGate .auth-card:hover,
.auth-action-page .auth-card--action:hover {
  border-color: rgba(20, 24, 22, 0.22);
  box-shadow: 0 1px 4px rgba(15, 22, 18, 0.06);
  transform: none;
  background: #fff;
}

/* 입력 포커스 중 — lift·그림자 변화 없음 (main.css 무력화) */
#authGate .auth-card:focus-within,
.auth-action-page .auth-card--action:focus-within {
  transform: none;
}

.auth-card-head {
  margin-bottom: 24px;
  text-align: center;
}

.auth-eyebrow {
  margin: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
  color: var(--auth-editorial-muted);
}

.auth-card-head__rule {
  width: clamp(2rem, 10vw, 2.75rem);
  height: 1px;
  margin: 0 auto 16px;
  background: var(--auth-editorial-line-strong);
}

.auth-logo-image {
  max-width: 152px;
  margin: 0 auto 14px;
}

.auth-title {
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  text-transform: uppercase;
  color: var(--auth-editorial-ink);
  line-height: 1.3;
}

.auth-title::before {
  content: none;
  display: none;
}

.auth-lead,
.auth-sub {
  max-width: 320px;
  margin: 0 auto;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--auth-editorial-muted);
  line-height: 1.65;
}

/* ── 하단 colophon ── */

.auth-gate-foot {
  padding: 14px 20px max(18px, env(safe-area-inset-bottom));
  text-align: center;
}

.auth-gate-foot__tagline {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  text-transform: uppercase;
  color: rgba(53, 58, 66, 0.42);
}

.auth-gate-foot__links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-gate-foot__sep {
  color: rgba(53, 58, 66, 0.28);
  font-size: 0.75rem;
  user-select: none;
}

.auth-gate-foot__link {
  border: none;
  background: none;
  padding: 4px 2px;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--auth-editorial-muted);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--dur-1, 0.18s) var(--ease-soft, ease);
}

.auth-gate-foot__link:hover {
  color: var(--auth-editorial-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 탭 — 높이 전환만, 글자 fade 없음 ── */

#authGate {
  --auth-tab-switch-duration: 0.42s;
  --auth-tab-switch-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tabs {
  margin-bottom: 26px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--auth-editorial-line);
  border-radius: 0;
  box-shadow: none;
  position: relative;
  isolation: isolate;
}

.auth-tabs::before {
  display: block;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  border-radius: 0;
  background: #fff;
  border-bottom: 2px solid rgba(53, 58, 66, 0.28);
  box-shadow: none;
  transform: translate3d(0, 0, 0);
  transition: transform var(--auth-tab-switch-duration) var(--auth-tab-switch-ease);
  z-index: 0;
  will-change: transform;
}

.auth-tabs.auth-tabs--signup::before {
  transform: translate3d(100%, 0, 0);
}

.tab-btn {
  min-height: 48px;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--auth-editorial-muted);
  border-bottom: 2px solid transparent;
  background: transparent;
  transition:
    color var(--auth-tab-switch-duration) var(--auth-tab-switch-ease),
    opacity var(--auth-tab-switch-duration) var(--auth-tab-switch-ease);
  position: relative;
  z-index: 1;
}

.tab-btn.active {
  color: var(--auth-editorial-ink);
  background: transparent;
  border-bottom-color: transparent;
}

.tab-btn:not(.active) {
  opacity: 0.72;
}

.tab-btn:not(.active):hover {
  color: rgba(53, 58, 66, 0.82);
  opacity: 0.92;
}

.tab-btn.active {
  opacity: 1;
}

.tab-btn:focus-visible {
  outline-color: var(--auth-editorial-charcoal);
}

#authGate .auth-tab-panels,
#authGate .auth-tab-panels.auth-tab-panels--instant-rows {
  transition: none !important;
}

#authGate .auth-tab-panel[aria-hidden="true"] {
  visibility: hidden;
  opacity: 1;
  pointer-events: none;
}

#authGate .auth-tab-panel[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

#authGate .auth-tab-panel,
#authGate .auth-tab-panel__inner {
  transition: none;
  opacity: 1;
  transform: none;
}

#authGate .auth-tab-panel[aria-hidden="true"] .auth-tab-panel__inner,
#authGate .auth-tab-panel[aria-hidden="false"] .auth-tab-panel__inner {
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

/* 전환 중 패널 노출 유지 */
#authGate .auth-tab-panels--switching .auth-tab-panel[aria-hidden="false"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* 로그인·회원가입 초기(액션 전) 폼 영역 높이 고정 — 탭 전환 시 카드 크기 동일 */
#authGate {
  --auth-tab-panel-idle-min-h: 15.75rem;
}

#authGate .auth-tab-panels {
  grid-template-rows: var(--auth-tab-panel-idle-min-h) 0fr;
}

#authGate .auth-tab-panels.is-signup {
  grid-template-rows: 0fr var(--auth-tab-panel-idle-min-h);
}

/* 가입 폼이 늘어날 때(회사·이메일·2·3단계)만 행 높이 확장 */
#authGate .auth-tab-panels.is-signup:has(.signup-stage-shell.is-expanded),
#authGate .auth-tab-panels.is-signup:has(.signup-pw-firebase-wrap:not(.hidden)),
#authGate .auth-tab-panels.is-signup:has(.auth-form--signup-wizard.signup-step-2),
#authGate .auth-tab-panels.is-signup:has(.auth-form--signup-wizard.signup-step-3) {
  grid-template-rows: 0fr minmax(var(--auth-tab-panel-idle-min-h), auto);
}

#authGate .auth-tab-panel__inner {
  min-height: var(--auth-tab-panel-idle-min-h);
}

#authGate .auth-tab-panel--signup .auth-tab-panel__inner {
  display: flex;
  flex-direction: column;
}

#authGate .auth-form--login {
  padding-top: 0;
  padding-bottom: 0;
}

#authGate .auth-field--float {
  margin-bottom: 10px;
}

#authGate .auth-field--float input {
  min-height: 44px;
}

#authGate .auth-form--login .auth-submit {
  margin-top: 6px;
}

#authGate .auth-aux {
  margin-top: 10px;
}

#authGate .auth-form--signup-wizard.signup-step-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

#authGate .auth-form--signup-wizard.signup-step-1 .signup-step:not(.hidden) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 인라인 박스·CTA를 아래쪽으로 — 버튼 위 빈 공간 제거 (로그인 패널 min-height 는 유지) */
#authGate .auth-form--signup-wizard.signup-step-1 #companyInlineBox {
  margin-top: auto;
}

#authGate .auth-form--signup-wizard.signup-step-1 .signup-step-nav--first {
  margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {
  #authGate {
    --auth-tab-switch-duration: 0.01ms;
  }

  #authGate:not(.hidden) .auth-card {
    animation: none;
  }

  .auth-tabs::before {
    transition: none;
  }
}

/* ── 로그인 입력 — underline editorial ── */

#authGate .auth-field--float input {
  min-height: 44px;
  padding: 10px 0 11px;
  border: none;
  border-bottom: 1px solid var(--auth-editorial-line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#authGate .auth-field--float input:hover {
  border-bottom-color: rgba(15, 22, 18, 0.2);
}

#authGate .auth-field--float input:focus {
  border-bottom-color: var(--auth-editorial-charcoal);
  box-shadow: none;
  outline: none;
}

#authGate .auth-field--float .auth-label {
  left: 0;
  max-width: calc(100% - 8px);
}

#authGate .auth-field--float.pw-has-toggle .auth-label {
  max-width: calc(100% - 40px);
}

/* ── 입력 (회원가입·기타) ── */

.auth-gate input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
.auth-gate select,
.auth-gate textarea,
.auth-action-form-block input {
  border-radius: 0;
  border-color: var(--auth-editorial-line-strong);
  background: #fff;
}

.auth-form--login input:hover,
.auth-gate select:hover,
.auth-gate textarea:hover,
.auth-action-form-block input:hover {
  border-color: rgba(15, 22, 18, 0.2);
}

.auth-form--login input:focus,
.auth-gate select:focus,
.auth-gate textarea:focus,
.auth-action-form-block input:focus {
  border-color: var(--auth-editorial-charcoal);
  box-shadow: 0 0 0 1px var(--auth-editorial-charcoal);
}

.auth-label,
.auth-action-form-block .auth-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-editorial-muted);
}

.auth-field--float .auth-label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(53, 58, 66, 0.45);
}

/* ── CTA — 장바구니 empty「특가 상품 둘러보기」와 동일: 화이트 · 테두리만 강조 · 텍스트 쉬머 ── */

#authGate,
#signupConsentOverlay,
.auth-action-page {
  --auth-cta-bg: #ffffff;
  --auth-cta-bg-hover: #ffffff;
  --auth-cta-fg: var(--auth-editorial-ink, #353a42);
  --auth-cta-border: rgba(20, 24, 22, 0.12);
  --auth-cta-border-hover: rgba(20, 24, 22, 0.22);
  --auth-cta-shadow: none;
  --auth-cta-shadow-hover: 0 1px 4px rgba(15, 22, 18, 0.06);
}

#authGate .btn,
#signupConsentOverlay .btn,
.auth-action-page .btn {
  border-radius: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

:is(#authGate, #signupConsentOverlay, .auth-action-page) :is(.btn-primary, .auth-submit) {
  color: var(--auth-cta-fg);
  background: var(--auth-cta-bg);
  background-image: none;
  border: 1px solid var(--auth-cta-border);
  box-shadow: var(--auth-cta-shadow);
  transition:
    border-color var(--dur-1, 0.18s) var(--ease-soft, ease),
    box-shadow var(--dur-1, 0.18s) var(--ease-soft, ease),
    transform var(--dur-fast, 0.15s) var(--ease-out, ease);
}

:is(#authGate, #signupConsentOverlay, .auth-action-page)
  :is(.btn-primary, .auth-submit):hover:not(:disabled) {
  color: var(--auth-cta-fg);
  background: var(--auth-cta-bg-hover);
  background-image: none;
  border-color: var(--auth-cta-border-hover);
  box-shadow: var(--auth-cta-shadow-hover);
}

:is(#authGate, #signupConsentOverlay, .auth-action-page)
  :is(.btn-primary, .auth-submit):active:not(:disabled) {
  color: var(--auth-cta-fg);
  background: var(--auth-cta-bg-hover);
  background-image: none;
  border-color: var(--auth-cta-border-hover);
  box-shadow: var(--auth-cta-shadow-hover);
}

:is(#authGate, #signupConsentOverlay, .auth-action-page) .btn-primary:focus-visible {
  outline: 2px solid rgba(53, 58, 66, 0.18);
  outline-offset: 2px;
}

#authGate .auth-submit.btn-primary {
  font-weight: 600;
  letter-spacing: 0.05em;
}

:is(#authGate, #signupConsentOverlay, .auth-action-page) .btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

#authGate .btn-ghost,
.auth-action-page .btn-ghost {
  border-color: var(--auth-editorial-line-strong);
  background: #fff;
  color: var(--auth-editorial-ink);
}

#authGate .btn-ghost:hover,
.auth-action-page .btn-ghost:hover {
  background: #fafafa;
  border-color: rgba(15, 22, 18, 0.18);
}

#authGate .btn-text,
#authGate .auth-link {
  color: var(--auth-editorial-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

#authGate .btn-text:hover,
#authGate .auth-link:hover {
  color: var(--auth-editorial-ink);
}

/* ── 회원가입 위저드 ── */

.signup-wizard-head {
  padding: 14px 14px 12px;
  border-radius: 0;
  border: 1px solid var(--auth-editorial-line);
  background: #fff;
  box-shadow: none;
}

#authGate .auth-form--signup-wizard.signup-step-1 .signup-wizard-head,
#authGate .auth-form--signup-wizard.signup-step-2 .signup-wizard-head,
#authGate .auth-form--signup-wizard.signup-step-3 .signup-wizard-head {
  border-color: var(--auth-editorial-line);
  background: #fff;
  box-shadow: none;
}

#authGate .auth-form--signup-wizard.signup-step-2 .signup-step-heading,
#authGate .auth-form--signup-wizard.signup-step-3 .signup-step-heading {
  color: var(--auth-editorial-ink);
}

#authGate .inline-box,
#authGate .signup-pw-firebase-panel,
#authGate .signup-shipping-block.inline-box {
  border-color: var(--auth-editorial-line);
  background: #fff;
  border-radius: 0;
}

#authGate .inline-title,
#authGate .inline-fixed-domain {
  color: var(--auth-editorial-ink);
}

#authGate .inline-fixed-domain {
  border-color: var(--auth-editorial-line-strong);
  background: #fafafa;
}

#authGate #companyGuideText {
  color: var(--auth-editorial-muted);
  white-space: normal;
}

.signup-step-heading {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--auth-editorial-ink);
}

.signup-subprogress__seg {
  border-radius: 0;
  background: rgba(15, 22, 18, 0.08);
  box-shadow: none;
}

.signup-subprogress__seg.is-done,
.signup-subprogress__seg.is-active {
  background: rgba(53, 58, 66, 0.55);
  box-shadow: none;
}

.inline-box,
.forgot-pw-panel,
.signup-shipping-block.inline-box {
  border-radius: 0;
  border: 1px solid var(--auth-editorial-line);
  background: #fff;
  padding: 14px;
}

/* 가입 1단계 전체 펼침 — 비밀번호·PIN 블록이 뷰포트 밖으로 나가지 않게 밀도 조정 */
#authGate .auth-form--signup-wizard {
  gap: 10px;
}

#authGate .signup-wizard-head {
  padding: 10px 12px 9px;
}

#authGate .signup-subprogress {
  margin: 0 0 10px;
}

#authGate .signup-step {
  gap: 8px;
}

#authGate #companyInlineBox.inline-box {
  padding: 10px 11px;
  gap: 8px;
}

#authGate .signup-stage {
  gap: 8px;
  padding-top: 0;
}

#authGate .signup-pw-firebase-wrap {
  margin-top: 6px;
}

#authGate .signup-pw-firebase-panel {
  padding: 10px 11px;
  gap: 8px;
  border-radius: 0;
  border-color: var(--auth-editorial-line);
  background: #fff;
  box-shadow: none;
}

#authGate .auth-form--signup-wizard .field-block {
  gap: 5px;
}

#authGate .auth-form--signup-wizard input,
#authGate .auth-form--signup-wizard select,
#authGate .auth-form--signup-wizard .btn {
  min-height: 44px;
}

#authGate .pin-code-field {
  margin: 4px 0 0;
}

#authGate .pin-code-field__hint {
  margin: 0 0 6px;
  font-size: 0.72rem;
  line-height: 1.4;
}

#authGate .pin-code-input-host.pin-code-input {
  padding: 2px 0 0;
}

#authGate .pin-code-input__cells {
  gap: 8px;
}

#authGate .pin-code-input__cell {
  width: 42px;
  height: 46px;
  font-size: 1.15rem;
  border-radius: 0;
}

#authGate .signup-step-nav {
  margin-top: 2px;
}

#authGate .signup-step-heading {
  font-size: 0.9375rem;
  line-height: 1.35;
}

.inline-title {
  color: var(--auth-editorial-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.inline-fixed-domain {
  border-radius: 0;
  border-color: var(--auth-editorial-line-strong);
  background: #fafafa;
  color: var(--auth-editorial-ink);
  font-weight: 600;
}

.email-verify-panel {
  border-radius: 0;
  border: 1px solid var(--auth-editorial-line);
  background: #fff;
}

#authGate .auth-card--verify-pending .auth-forms-viewport {
  display: none !important;
}

#authGate .auth-card--verify-pending .auth-card-head {
  margin-bottom: 14px;
}

#authGate .auth-card--verify-pending .email-verify-panel {
  margin-top: 0;
}

#authGate .auth-card--verify-pending > .msg {
  display: none;
}

.email-verify-kicker {
  color: var(--auth-editorial-muted);
  letter-spacing: 0.12em;
}

/* ── 약관 동의 모달 ── */

.signup-consent-overlay {
  background: rgba(15, 22, 18, 0.32);
}

.signup-consent-dialog {
  border-radius: 0;
  border: 1px solid var(--auth-editorial-line-strong);
  box-shadow: 0 16px 48px rgba(15, 22, 18, 0.1);
}

.signup-consent-head,
.signup-consent-foot {
  border-color: var(--auth-editorial-line);
}

.signup-consent-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-editorial-ink);
}

.signup-consent-row--all {
  border-bottom-color: var(--auth-editorial-line);
}

.signup-consent-row__badge {
  border-radius: 0;
  background: #f4f4f4;
  color: var(--auth-editorial-ink);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
}

.signup-consent-link {
  color: var(--auth-editorial-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── auth-action.html ── */

.auth-action-page {
  --aa-ink: var(--auth-editorial-ink);
  --aa-muted: var(--auth-editorial-muted);
  --aa-line: var(--auth-editorial-line);
  --aa-line-strong: var(--auth-editorial-line-strong);
  --aa-shadow: none;
  --aa-ring-shadow: none;
}

.auth-action-title {
  font-size: clamp(1.05rem, 3.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-editorial-ink);
}

.auth-action-lead,
.auth-action-hint {
  color: var(--auth-editorial-muted);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.auth-action-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 0;
  border: 1px solid var(--auth-editorial-line-strong);
  box-shadow: none;
  color: var(--auth-editorial-ink);
}

.auth-action-icon-ring--success {
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
}

.auth-action-icon-ring--success svg {
  width: 40px;
  height: 40px;
}

.auth-action-email-pill {
  border-radius: 0;
  border-color: var(--auth-editorial-line-strong);
  background: #fafafa;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-action-form-label {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--auth-editorial-muted);
}

.auth-action-error-callout {
  border-radius: 0;
  border-color: var(--auth-editorial-line-strong);
  background: #fff;
}

.auth-action-muted-rule {
  background: var(--auth-editorial-line);
}

/* ── PC (901px+) — 로그인·회원가입 가독성 ── */

@media (min-width: 901px) {
  #authGate .auth-card-anchor {
    width: min(472px, 100%);
  }

  #authGate .auth-card {
    padding: 36px 34px 32px;
  }

  #authGate .auth-card-head {
    margin-bottom: 28px;
  }

  #authGate .auth-eyebrow {
    font-size: 0.8125rem;
  }

  #authGate .auth-logo-image {
    max-width: 176px;
    margin-bottom: 16px;
  }

  #authGate .auth-title {
    font-size: 1.125rem;
    margin-bottom: 12px;
  }

  #authGate .auth-lead,
  #authGate .auth-sub {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 360px;
  }

  #authGate .auth-tabs {
    margin-bottom: 28px;
  }

  #authGate .tab-btn {
    min-height: 52px;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
  }

  #authGate .auth-field--float input {
    min-height: 50px;
    font-size: 1.0625rem;
    padding: 13px 0;
  }

  #authGate .auth-field--float .auth-label {
    font-size: 1rem;
  }

  #authGate .auth-field--float:focus-within .auth-label,
  #authGate .auth-field--float.is-label-floated .auth-label,
  #authGate .auth-field--float:has(input:not(:placeholder-shown)) .auth-label,
  #authGate .auth-field--float:has(input:-webkit-autofill) .auth-label {
    font-size: 0.8125rem;
  }

  #authGate :is(.btn-primary, .auth-submit, .btn-ghost) {
    font-size: 1rem;
  }

  #authGate :is(.btn-primary, .auth-submit).full {
    min-height: 50px;
    font-size: 1.0625rem;
  }

  #authGate .btn-ghost {
    min-height: 46px;
  }

  #authGate .btn-text,
  #authGate .auth-link {
    font-size: 0.9375rem;
  }

  #authGate .signup-step-heading {
    font-size: 1.125rem;
  }

  #authGate .inline-title {
    font-size: 0.9375rem;
  }

  #authGate #companyGuideText {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  #authGate .inline-fixed-domain {
    font-size: 0.9375rem;
  }

  #authGate .auth-form--signup-wizard input,
  #authGate .auth-form--signup-wizard select,
  #authGate .auth-form--signup-wizard .btn {
    min-height: 46px;
    font-size: 1rem;
  }

  #authGate .field-block {
    font-size: 0.9375rem;
  }

  #authGate .field-block input,
  #authGate .field-block select,
  #authGate .field-block textarea {
    font-size: 1rem;
  }

  #authGate .pin-code-field__hint {
    font-size: 0.8125rem;
  }

  #authGate .pin-code-input__cell {
    width: 46px;
    height: 50px;
    font-size: 1.25rem;
  }

  #authGate .signup-shipping-hint {
    font-size: 0.875rem;
  }

  #authGate .step-msg {
    font-size: 0.875rem;
  }

  #authGate .forgot-pw-lead {
    font-size: 0.9375rem;
  }

  #authGate .forgot-pw-panel input,
  #authGate .email-verify-panel input {
    font-size: 1rem;
    min-height: 46px;
  }

  #authGate .email-verify-kicker {
    font-size: 0.8125rem;
  }

  #authGate .email-verify-lead {
    font-size: 1.0625rem;
  }

  #authGate .email-verify-hint,
  #authGate .email-verify-checklist {
    font-size: 0.9375rem;
  }

  #authGate .msg {
    font-size: 0.9375rem;
  }

  #authGate .auth-gate-foot__link,
  #authGate .auth-gate-foot__sep {
    font-size: 0.8125rem;
  }

  #signupConsentOverlay .signup-consent-title {
    font-size: 1.0625rem;
  }

  #signupConsentOverlay .signup-consent-body {
    font-size: 0.9375rem;
    line-height: 1.65;
  }
}

/* ── 모바일 — 편집샵 톤 유지 (main.css 레거시 라운드·그린 덮어쓰기) ── */

@media (max-width: 760px) {
  #authGate .auth-card {
    padding: clamp(22px, 5vw, 28px) clamp(18px, 4vw, 22px) clamp(20px, 4vw, 24px);
    border-radius: 0;
  }

  #authGate .auth-title {
    font-size: 0.8125rem;
  }

  #authGate .auth-lead,
  #authGate .auth-sub {
    font-size: 0.78rem;
  }

  #authGate .auth-tabs {
    padding: 0;
    margin-bottom: 22px;
  }

  #authGate .auth-tabs::before {
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
  }

  #authGate .auth-form--login {
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 560px) {
  #authGate:not(.hidden) .auth-gate-main {
    padding: 12px 10px;
  }

  #authGate .auth-gate-foot {
    padding-inline: 12px;
  }
}

/* ── EIBE Workspace 런처 (몰 진입 후 · @eibe.co.kr · @btmall.kr) ── */
.space-launcher-wrap {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.space-launcher-wrap.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
body:has(#mallBackToTop.is-visible) .space-launcher-wrap.is-visible {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
}

.space-launcher-bubble {
  position: relative;
  max-width: min(272px, calc(100vw - 28px));
  padding: 11px 14px;
  border-radius: 12px 12px 4px 12px;
  border: 1px solid rgba(15, 22, 40, 0.08);
  background: #fff;
  color: #1a2332;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 28px rgba(15, 22, 40, 0.1);
  animation: space-launcher-bubble-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.space-launcher-bubble[hidden] {
  display: none;
}
.space-launcher-bubble::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid rgba(15, 22, 40, 0.08);
  border-bottom: 1px solid rgba(15, 22, 40, 0.08);
  transform: rotate(45deg);
  box-shadow: 4px 4px 10px rgba(15, 22, 40, 0.04);
}
.space-launcher-bubble__text {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: #1a2332;
  min-height: calc(0.84rem * 1.45);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.space-launcher-bubble__text.is-fading {
  opacity: 0;
  transform: translateY(-5px);
}

@keyframes space-launcher-bubble-in {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  65% {
    transform: translateY(-3px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.space-launcher {
  --space-launcher-accent: #3cb34a;
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px 11px 15px;
  color: #f4f6f8;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%),
    rgba(16, 19, 26, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 28px rgba(9, 12, 20, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}
.space-launcher::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--space-launcher-accent);
  opacity: 0.72;
  transition: opacity 0.22s ease, top 0.22s ease, bottom 0.22s ease;
}
.space-launcher-wrap.is-visible .space-launcher {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
/* 백투탑이 올라올 때 함께 부드럽게 내려가며 사라짐 — wrap 에서 처리 */
.space-launcher.is-visible:hover {
  transform: translateY(-2px) scale(1);
  border-color: rgba(60, 179, 74, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 14px 32px rgba(9, 12, 20, 0.34);
}
.space-launcher.is-visible:hover::before {
  opacity: 1;
  top: 8px;
  bottom: 8px;
}
.space-launcher:focus-visible {
  outline: 2px solid var(--space-launcher-accent);
  outline-offset: 3px;
}
.space-launcher__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
  min-width: 0;
}
.space-launcher__eyebrow {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 246, 248, 0.48);
}
.space-launcher__title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(244, 246, 248, 0.92);
}
.space-launcher__title b {
  font-weight: 750;
  color: #67c872;
}
.space-launcher__arrow {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(103, 200, 114, 0.85);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.22s ease;
}
.space-launcher.is-visible:hover .space-launcher__arrow {
  color: #7ad684;
  transform: translateX(3px);
}

@media (max-width: 560px) {
  .space-launcher-wrap {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }
  .space-launcher-bubble {
    max-width: min(248px, calc(100vw - 24px));
    padding: 10px 12px;
  }
  .space-launcher-bubble__text { font-size: 0.8rem; }
  .space-launcher {
    gap: 10px;
    padding: 10px 12px 10px 13px;
  }
  .space-launcher__title { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .space-launcher-wrap,
  .space-launcher,
  .space-launcher-bubble {
    transition: none;
    animation: none;
  }
  .space-launcher-bubble__text {
    transition: none;
  }
}
