/* Gate.jsx — intake wizard / OTP gate. Uses the rate-card design tokens. */
.gate-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(123, 75, 196, .35), transparent 60%),
    linear-gradient(160deg, #2A1450 0%, #1A1330 60%, #140E26 100%);
  font-family: var(--font);
}
.gate-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, .12); z-index: 1001; }
.gate-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-bright), var(--gold)); transition: width .35s ease; }
/* 언어 토글: 하얀 카드 내부 우상단 고정 · 'KR / EN'(활성 언어 강조) */
.gate-lang {
  position: absolute; top: 26px; right: 26px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; color: var(--ink-mute); border: 1px solid rgba(20, 14, 38, .14);
  border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; line-height: 1; cursor: pointer;
}
.gate-lang:hover { border-color: var(--accent-bright); }
.gate-lang .on { color: var(--accent-deep); font-weight: 800; }

.gate-card {
  position: relative;
  width: min(540px, 100%); background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 34px 34px 30px; animation: gateIn .4s ease;
}
@keyframes gateIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.gate-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.gate-brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(33,28,69,.08), 0 6px 18px rgba(138,111,224,.18); }
.gate-brand span { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 16px; line-height: 1; letter-spacing: -.01em; color: var(--ink); font-weight: 700; white-space: nowrap; }

.gate-count { font-size: 12px; color: var(--ink-mute); font-weight: 600; margin-bottom: 8px; letter-spacing: .02em; }
.gate-q { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.35; letter-spacing: -.01em; }
.gate-required {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 6px;
  border: 1px solid rgba(157, 36, 73, .24); border-radius: 999px; padding: 2px 6px;
  background: #FFF2F6; color: #9D2449; font-size: 10.5px; font-weight: 800;
  letter-spacing: .02em; line-height: 1;
}
.gate-required > span { font-size: 12px; line-height: 1; }
.gate-opt { font-size: 12.5px; font-weight: 500; color: var(--ink-mute); }
.gate-sub { font-size: 13.5px; color: var(--ink-mute); margin: 7px 0 0; line-height: 1.5; }

/* grouped multi-field pages */
.gate-grid { display: flex; flex-wrap: wrap; gap: 15px 16px; margin-top: 20px; }
.gate-field { flex: 1 1 100%; min-width: 0; }
.gate-field.half { flex: 1 1 calc(50% - 8px); }
.gate-flabel { display: flex; align-items: center; min-height: 22px; font-size: 12.5px; font-weight: 700; color: var(--ink-mute); margin-bottom: 2px; letter-spacing: .01em; }
.gate-field .gate-input { margin-top: 2px; font-size: 17px; }
.gate-field .gate-chips { margin-top: 8px; }
.gate-field .gate-budget { margin-top: 10px; }
.gate-date { cursor: pointer; }

.gate-input {
  width: 100%; margin-top: 18px; border: 0; border-bottom: 2px solid var(--line-strong);
  padding: 10px 2px; font: inherit; font-size: 19px; color: var(--ink); background: transparent; outline: none;
  transition: border-color .2s;
}
.gate-input:focus { border-color: var(--accent-bright); }
.gate-input.code { letter-spacing: .4em; font-size: 24px; text-align: center; }

.gate-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.gate-chip {
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 9px 15px; font: inherit; font-size: 13.5px; cursor: pointer; transition: all .15s;
}
.gate-chip:hover { border-color: var(--accent-bright); }
.gate-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.gate-budget { margin-top: 22px; }
.gate-budget-val { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.gate-budget input[type="range"] { width: 100%; accent-color: var(--accent); }
.gate-budget-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--ink-mute); }

.gate-consent { display: flex; gap: 9px; align-items: flex-start; margin: 16px 0; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.gate-consent input { margin-top: 2px; accent-color: var(--accent); }
.gate-consent a { color: var(--accent); }

.gate-err { margin-top: 14px; color: #B23A52; font-size: 13px; font-weight: 600; }
.gate-ok { margin: 6px 0 16px; color: var(--accent-deep); font-size: 13px; background: var(--cream-deep); padding: 10px 12px; border-radius: var(--r-sm); line-height: 1.5; }

.gate-nav { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.gate-btn {
  font: inherit; font-weight: 700; font-size: 14px; border-radius: var(--r-sm);
  padding: 11px 20px; cursor: pointer; border: 1.5px solid transparent; transition: all .15s;
}
.gate-btn.primary { background: var(--accent); color: #fff; }
.gate-btn.primary:hover { background: var(--accent-deep); }
.gate-btn.primary:disabled { opacity: .55; cursor: default; }
.gate-btn.primary.wide { width: 100%; justify-content: center; margin-top: 18px; padding: 13px; }
.gate-btn.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-strong); }
.gate-btn.ghost:hover { border-color: var(--accent-bright); color: var(--accent); }
.gate-btn.link { background: none; border: 0; color: var(--accent); padding: 10px 0 0; font-size: 13px; }
.gate-enter { margin-left: auto; font-size: 11.5px; color: var(--ink-mute); }
.gate-intro .gate-q { font-size: 27px; }
.gate-intro .gate-btn { margin-top: 24px; }

/* success screen */
.gate-done { text-align: center; padding: 6px 0 4px; }
.gate-check {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #fff; font-size: 28px; line-height: 56px; font-weight: 700;
}
.gate-done .gate-q { font-size: 21px; line-height: 1.4; }
/* 성공 화면 타이틀: 어절/구절 단위로만 줄바꿈 → 좁은 화면에서 ~3줄, 넓은 화면은 자동. 구절 내부는 안 쪼개짐. */
.gate-done-title { word-break: keep-all; }
.gate-done-title .ph { display: inline-block; white-space: nowrap; }
.gate-done .gate-sub { margin: 10px 0 22px; }
.gate-btn.ghost.wide { width: 100%; justify-content: center; margin-top: 10px; padding: 13px; display: block; text-align: center; text-decoration: none; }

@media (max-width: 560px) {
  .gate-card { padding: 26px 22px; }
  .gate-q { font-size: 19px; }
  .gate-enter { display: none; }
  .gate-field.half { flex: 1 1 100%; }
}
