:root {
  --bg:        #f7f6f3;
  --white:     #ffffff;
  --ink-900:   #111110;
  --ink-700:   #2c2c2a;
  --ink-500:   #6b6b67;
  --ink-300:   #b0afa9;
  --ink-100:   #e8e7e3;
  --ink-50:    #f2f1ee;
  --accent:    #1a1a18;
  --accent-2:  #3d6bff;
  --accent-lt: #6b8fff;
  --border:    rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; font-family: 'Noto Sans KR', 'DM Sans', sans-serif; background: var(--bg); }

/* ── Canvas dots ── */
#dot-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.55;
}

/* ── Layout ── */
.split-wrap { display: flex; height: 100vh; width: 100vw; }

/* ── LEFT 40% ── */
.panel-left {
  flex: 0 0 40%;
  position: relative;
  background: var(--white);
  overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 3.2rem 3.5rem 3rem 3.5rem;
  border-right: 1px solid var(--border);
}
.panel-left::before {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 220px; height: 220px;
  background: radial-gradient(ellipse at bottom right, #e8edff 0%, transparent 70%);
  pointer-events: none;
}

/* brand */
.brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand-icon {
  width: 40px; height: 40px;
  background: var(--ink-900); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 1.05rem; font-weight: 700; color: var(--ink-900); letter-spacing: -0.02em; }
.brand-tag  { font-size: 0.6rem; font-weight: 400; color: var(--ink-300); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 1px; }

/* hero */
.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.67rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 1.4rem;
}
.hero-label::before { content: ''; width: 20px; height: 1.5px; background: var(--accent-2); border-radius: 2px; }

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 3.5vw, 3.6rem);
  font-weight: 600; line-height: 1.1;
  color: var(--ink-900); letter-spacing: -0.02em; margin-bottom: 1.5rem;
}
.hero-title em { font-style: normal; font-weight: 700; color: var(--accent-2); }

.hero-desc { font-size: 0.82rem; font-weight: 300; color: var(--ink-500); line-height: 1.9; max-width: 280px; }

.feature-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 10px; }
.feature-item { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; color: var(--ink-700); }
.feature-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); flex-shrink: 0; }

.left-footer { font-size: 0.65rem; color: var(--ink-300); letter-spacing: 0.06em; position: relative; z-index: 2; }

/* ── RIGHT 60% ── */
.panel-right {
  flex: 0 0 60%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; position: relative;
}
.panel-right::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.14) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

/* form card */
.form-card {
  width: 100%; max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 2.4rem 2.4rem 2rem;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 2;
}
.form-card::before {
  content: '';
  position: absolute; top: 0; left: 2rem; right: 2rem; height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-lt));
  border-radius: 0 0 4px 4px;
}

.card-eyebrow { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.4rem; }
.card-title   { font-family: 'Playfair Display', serif; font-size: 1.55rem; font-weight: 600; color: var(--ink-900); letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.card-sub     { font-size: 0.75rem; color: var(--ink-300); font-weight: 300; margin-bottom: 1.6rem; }

/* fields */
.f-group { margin-bottom: 0.85rem; }
.f-label {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; font-weight: 500;
  color: var(--ink-700); margin-bottom: 0.38rem; letter-spacing: 0.02em;
}
.f-label a { color: var(--accent-2); font-size: 0.65rem; cursor: pointer; text-decoration: none; font-weight: 400; }
.f-label a:hover { text-decoration: underline; }

.f-wrap { position: relative; }
.f-ico {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-300); pointer-events: none; transition: color .22s;
}
.f-wrap:focus-within .f-ico { color: var(--accent-2); }

.f-inp {
  width: 100%; background: var(--ink-50);
  border: 1.5px solid transparent; border-radius: 10px;
  color: var(--ink-900); font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.88rem; padding: 0.65rem 1rem 0.65rem 2.65rem; outline: none;
  transition: border-color .22s, background .22s, box-shadow .22s;
}
.f-inp::placeholder { color: var(--ink-300); }
.f-inp:hover { background: #eeedea; }
.f-inp:focus { background: var(--white); border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(61,107,255,0.1); }
.f-inp.pr { padding-right: 2.65rem; }

.f-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; padding: 0;
  color: var(--ink-300); cursor: pointer; display: flex; transition: color .2s;
}
.f-toggle:hover { color: var(--accent-2); }

/* 로그인 실패 인라인 표시(아이디 위, 가운데, 빨강) */
.fail-inline {
  text-align: center;
  color: #dc2626; font-weight: 700; font-size: 0.78rem;
  margin: 0.1rem 0 0.7rem;
}

/* separator */
.f-sep { display: flex; align-items: center; gap: 10px; margin: 1rem 0; }
.f-sep-line { flex: 1; height: 1px; background: var(--ink-100); }
.f-sep-txt  { font-size: 0.6rem; color: var(--ink-300); letter-spacing: 0.14em; text-transform: uppercase; }

/* remember */
.f-remember { display: flex; align-items: center; gap: 10px; margin-bottom: 1.3rem; }
.f-chk {
  width: 17px; height: 17px;
  border: 1.5px solid var(--ink-100); border-radius: 5px;
  background: var(--ink-50); appearance: none; -webkit-appearance: none;
  cursor: pointer; position: relative; transition: .2s; flex-shrink: 0;
}
.f-chk:checked { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(61,107,255,0.15); }
.f-chk:checked::after {
  content: ''; position: absolute;
  left: 4px; top: 1px; width: 6px; height: 10px;
  border: 1.5px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg);
}
.f-chk-lbl   { font-size: 0.78rem; color: var(--ink-500); cursor: pointer; user-select: none; }
.f-chk-badge {
  margin-left: auto; font-size: 0.62rem;
  background: #edf0ff; color: var(--accent-2);
  border: 1px solid #d4dcff; border-radius: 999px;
  padding: 2px 10px; white-space: nowrap;
}

/* submit */
.btn-go {
  width: 100%; padding: 0.85rem; border: none; border-radius: 10px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; cursor: pointer; position: relative; overflow: hidden;
  background: var(--ink-900);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform .15s, box-shadow .22s, background .22s;
}
.btn-go:hover { background: #2a2a28; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0,0,0,0.28); }
.btn-go:active { transform: translateY(0); }
.btn-go .arr  { display: inline-block; margin-left: 8px; transition: transform .2s; }
.btn-go:hover .arr { transform: translateX(5px); }
.btn-bar   { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: rgba(255,255,255,0.08); transition: width 1.8s linear; }
.btn-inner { position: relative; }

/* contacts */
.card-contacts { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--ink-100); }
.cc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.26rem 0; font-size: 0.78rem; color: var(--ink-500);
}
.cc-row + .cc-row { border-top: 1px solid var(--ink-50); }
.cc-name { font-weight: 500; color: var(--ink-700); }
.cc-num  { color: var(--accent-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── 모달 공통 ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 18px; padding: 2rem 2rem 1.8rem;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  position: relative; animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-300); font-size: 1.2rem; line-height: 1; transition: color .15s;
}
.modal-close:hover { color: var(--ink-700); }
.modal-stripe {
  position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-lt));
  border-radius: 0 0 4px 4px;
}
.modal-eyebrow { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.3rem; }
.modal-title   { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 600; color: var(--ink-900); margin-bottom: 0.2rem; }
.modal-sub     { font-size: 0.73rem; color: var(--ink-300); font-weight: 300; margin-bottom: 1.5rem; line-height: 1.6; }
.modal-group   { margin-bottom: 0.9rem; }
.modal-label   { display: block; font-size: 0.7rem; font-weight: 500; color: var(--ink-700); margin-bottom: 0.38rem; letter-spacing: 0.02em; }
.modal-wrap    { position: relative; }
.modal-ico {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-300); pointer-events: none; transition: color .2s;
}
.modal-wrap:focus-within .modal-ico { color: var(--accent-2); }
.modal-inp {
  width: 100%; background: var(--ink-50);
  border: 1.5px solid transparent; border-radius: 10px;
  color: var(--ink-900); font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.87rem; padding: 0.68rem 1rem 0.68rem 2.6rem; outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.modal-inp::placeholder { color: var(--ink-300); }
.modal-inp:focus { background: var(--white); border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(61,107,255,0.1); }
.btn-send {
  width: 100%; margin-top: 1.2rem; padding: 0.82rem; border: none; border-radius: 10px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; cursor: pointer; background: var(--ink-900);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18); transition: transform .15s, background .2s;
}
.btn-send:hover { background: #2a2a28; transform: translateY(-1px); }
.btn-send:active { transform: translateY(0); }
.btn-send.sent  { background: #16a34a; }
.btn-send:disabled { opacity: .6; cursor: default; transform: none; }
.modal-notice {
  display: none; margin-top: 0.9rem; padding: 0.7rem 1rem;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; font-size: 0.73rem; color: #15803d;
  line-height: 1.6; text-align: center;
}
.modal-notice.show { display: block; }

/* ── KCP 본인인증 모달 ── */
.kcp-inp {
  text-align: center; letter-spacing: 0.35em;
  font-size: 1.1rem; font-weight: 600;
  padding-left: 1rem; padding-right: 1rem;
}
.kcp-err {
  display: none; margin-top: 0.6rem;
  font-size: 0.72rem; color: #dc2626; text-align: center;
}
.kcp-err.show { display: block; }

/* ── Mobile : 왼쪽 패널 숨기고 폼 카드만 ── */
@media (max-width: 768px) {
  html, body { overflow: auto; }
  .split-wrap { flex-direction: column; min-height: 100vh; }
  .panel-left  { display: none; }
  .panel-right { flex: 1 1 auto; width: 100%; padding: 1.5rem 1.25rem; align-items: center; }
  .form-card   { border-radius: 16px; padding: 2rem 1.75rem 1.75rem; }
}

/* ── 로그인 오류 팝업 ── */
.err-box {
  text-align: center;
  padding: 2.4rem 2rem 2rem;
  max-width: 320px;
}
.err-icon {
  width: 56px; height: 56px;
  background: #fff5f5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}
.err-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 600;
  color: var(--ink-900); margin-bottom: 0.5rem;
}
.err-msg {
  font-size: 0.82rem; color: var(--ink-500);
  line-height: 1.7; margin-bottom: 1.5rem;
}
.err-count {
  margin-top: 0.7rem;
  color: #dc2626; font-weight: 700; font-size: 0.8rem;
}
.btn-err-close {
  width: 100%; padding: 0.75rem;
  border: none; border-radius: 10px;
  background: #dc2626; color: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: background .2s, transform .15s;
}
.btn-err-close:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-err-close:active { transform: translateY(0); }
