/**
 * croquis-ai — 프로덕션 UI (mvp.css · croquis_master 위에 로드)
 * 타이포: 한글 본문 -0.01em~0, 제목 -0.02~-0.03em, 캡션 +0.02em
 */
:root {
  --cq-navy: #1b2b6b;
  --cq-ai-certain-bg: #eff6ff;
  --cq-ai-certain-bd: #3b82f6;
  --cq-ai-guess-bg: #fffbeb;
  --cq-ai-guess-bd: #f59e0b;
  --cq-empty-bd: #e5e7eb;
  --cq-input-bd: #e5e7eb;
  --cq-warn-bg: #fff7ed;
  --cq-warn-text: #c2410c;
  --cq-kakao: #fae100;
  --cq-kakao-text: #3c1e1e;
  --cq-wechat: #07c160;
  --cq-shell: 390px;
  --cq-home-bar: 28px;
  --cq-text-primary: #0f172a;
  --cq-text-secondary: #64748b;
  --cq-text-tertiary: #94a3b8;
  --cq-track-display: -0.03em;
  --cq-track-title: -0.022em;
  --cq-track-body: -0.011em;
  --cq-track-ui: -0.008em;
  --cq-track-badge: 0.02em;
  --cq-track-caps: 0.04em;
  --cq-lh-tight: 1.28;
  --cq-lh-snug: 1.4;
  --cq-lh-body: 1.55;
  --cq-lh-relaxed: 1.62;
  --cq-radius-sm: 12px;
  --cq-radius-md: 14px;
  --cq-radius-lg: 18px;
  --cq-radius-xl: 20px;
}

body.mvp {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
  color: var(--cq-text-primary);
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

/* ── AI 3단계 필드 ───────────────────────── */
.cq-ai-field {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
}
.cq-ai-field--certain {
  background: var(--cq-ai-certain-bg);
  border-left: 3px solid var(--cq-ai-certain-bd);
  border-radius: 0 12px 12px 0;
}
.cq-ai-field--guess {
  background: var(--cq-ai-guess-bg);
  border-left: 3px solid var(--cq-ai-guess-bd);
  border-radius: 0 12px 12px 0;
}
.cq-ai-field--empty {
  background: #fff;
  border: 1.5px dashed var(--cq-empty-bd);
}
.cq-ai-field__label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}
.cq-ai-field__value {
  font-size: 15px;
  line-height: var(--cq-lh-body);
  letter-spacing: var(--cq-track-body);
  color: var(--cq-text-primary);
}
.cq-ai-edit {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 36px;
  min-width: 36px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
}
.cq-ai-edit:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Step 3 분석 말풍선 */
.cq-confirm-wrap {
  max-width: 100%;
}
.cq-ai-bubble {
  background: var(--cq-ai-certain-bg);
  border-left: 3px solid var(--cq-ai-certain-bd);
  border-radius: 0 16px 16px 12px;
  padding: 16px 16px 16px 15px;
  font-size: 15px;
  line-height: var(--cq-lh-relaxed);
  letter-spacing: var(--cq-track-body);
  color: #1e293b;
  margin-bottom: 12px;
}
.cq-ai-bubble__lead {
  font-weight: 700;
  letter-spacing: var(--cq-track-title);
  margin-bottom: 12px;
}
.cq-ai-bubble__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.cq-ai-bubble__bullet {
  margin: 4px 0 0 16px;
  padding: 0;
  list-style: disc;
}
.cq-ai-bubble__bullet li {
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

/* 확인 단계 버튼 */
.cq-btn-confirm-ok {
  min-height: 52px !important;
  background: var(--cq-navy) !important;
  border-color: var(--cq-navy) !important;
  color: #fff !important;
  border-radius: var(--cq-radius-md) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: var(--cq-track-ui) !important;
}
.cq-btn-confirm-edit {
  min-height: 44px !important;
  border: 1.5px solid var(--cq-input-bd) !important;
  background: #fff !important;
  color: #374151 !important;
  border-radius: 12px !important;
}

/* Step 1 꿀팁 노랑 */
.cm-upload-tip.cq-upload-honey {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
}

/* Step 2 요청 */
.cq-wish-head {
  padding: 0 4px 8px;
}
.cq-wish-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: var(--cq-track-title);
  line-height: var(--cq-lh-snug);
  color: var(--cq-text-primary);
  margin: 0 0 8px;
}
.cq-wish-sub {
  font-size: 14px;
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-body);
  color: var(--cq-text-secondary);
  margin: 0;
}
#textInput.cq-wish-textarea {
  min-height: 120px;
  border-radius: var(--cq-radius-md);
  padding: 14px 16px;
  font-size: 16px;
  line-height: var(--cq-lh-body);
  letter-spacing: var(--cq-track-body);
  border: 1.5px solid var(--cq-input-bd);
}
.mvp-btn-wo-gen:disabled,
.mvp-btn-wo-gen.mvp-btn--disabled {
  background: #9ca3af !important;
  border-color: #9ca3af !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* 로그인 */
.mvp-btn-kakao-main {
  min-height: 56px !important;
  border-radius: 14px !important;
  font-size: 16px !important;
  background: var(--cq-kakao) !important;
  color: var(--cq-kakao-text) !important;
  border: none !important;
  font-weight: 600 !important;
}
.mvp-btn-google.mvp-btn-secondary-oauth {
  min-height: 52px !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--cq-input-bd) !important;
  background: #fff !important;
}
.mvp-auth-footnote {
  font-size: 13px !important;
  color: #6b7280 !important;
  text-align: center !important;
  margin-top: 16px !important;
}

/* 조용한 빈칸 (TBD 대체) */
.cq-input-quiet {
  border: 1.5px dashed var(--cq-empty-bd) !important;
  background: #fff !important;
}
.cq-input-quiet::placeholder {
  color: #9ca3af;
}

/* 프로필 섹션 타이틀 */
/* 2026-04-19 (3차 개정) 대표 피드백 Image #54/#55 — 홈 새 메타 카드 톤과 통일.
   기존: 11px uppercase 회색 / 개정: 15px 700 weight, 검정, 타이트한 letter-spacing. */
.cq-profile-section-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-transform: none;
  color: #0f172a;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cq-profile-section-title svg {
  flex-shrink: 0;
  color: #64748b;
}

/* 히스토리 파이프라인 */
.cq-hist-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  margin: 8px 0;
  color: #64748b;
}
.cq-hist-pill {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.cq-hist-pill.is-done {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.cq-hist-pill.is-active {
  background: var(--cq-ai-certain-bg);
  border-color: #93c5fd;
  color: var(--cq-navy);
  font-weight: 600;
}
.cq-hist-arrow {
  color: #cbd5e1;
}

/* 결과 카드 — AI 3단계 블록 */
.mvp-spec-ai-block.cq-block-certain {
  background: var(--cq-ai-certain-bg) !important;
  border: none !important;
  border-left: 3px solid var(--cq-ai-certain-bd) !important;
  border-radius: 0 16px 16px 0 !important;
  box-shadow: none !important;
}
.mvp-spec-ai-block.cq-block-guess {
  background: var(--cq-ai-guess-bg) !important;
  border: none !important;
  border-left: 3px solid var(--cq-ai-guess-bd) !important;
  border-radius: 0 16px 16px 0 !important;
  box-shadow: none !important;
}
.mvp-spec-ai-block-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--cq-track-title);
  line-height: var(--cq-lh-snug);
  color: var(--cq-text-primary);
}
.mvp-spec-ai-block-sub {
  font-size: 13px;
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-body);
  color: var(--cq-text-secondary);
}

.mvp-sheet-tab-body .tech-meas-input.mvp-meas-inp,
.mvp-result-inner .tech-meas-input.mvp-meas-inp {
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--cq-track-ui);
}
.mvp-meas-inp--empty {
  text-align: right !important;
}

/* ═══ 플로우 셸: 진행바 + 뒤로 고정 · 상용 타이포 ═══ */

.mvp-app-top-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
  max-width: 100%;
  width: 100%;
  /* 2026-04-18 QA-하윤: overflow:hidden → visible (모바일 drawer가 sticky 밖으로 펼쳐질 때 잘림 방지) */
  overflow: visible;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid #e5e7eb;
}
.mvp-app-top-sticky .app-top-nav {
  position: relative;
  top: auto;
}
.mvp-app-top-sticky .app-logo {
  /* 2026-04-18 대표 요청: 랜딩 로고와 letter-spacing 통일 — 기본 0.06em 유지 */
  letter-spacing: 0.06em;
}
/* 구형 진행바 — mvp_app 단계바는 .app-step-sticky 사용 */
.mvp-wizard-sticky {
  position: relative;
  top: auto;
  z-index: 1;
  flex-shrink: 0;
  background: transparent;
  border-bottom: none;
  padding-top: 0;
}

/* q-tag + 큰 제목 + 회색 부제 */
.mvp-flow-head.cq-proto-flow-head {
  padding: 8px 20px 16px;
  max-width: 100%;
}
.mvp-flow-head-row {
  align-items: flex-start;
  gap: 10px;
}
.mvp-flow-head-copy {
  flex: 1;
  min-width: 0;
}
.cq-q-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--cq-track-badge);
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  line-height: 1.2;
}
.cq-flow-title {
  /* 2026-04-18 대표 지시: /app dash-greeting h1 (22px/800) 톤 일치. 좌측 정렬 명시. */
  margin: 0 0 var(--space-2, 8px);
  font-size: var(--text-xl, 22px);
  font-weight: 800;
  line-height: var(--leading-tight, 1.3);
  letter-spacing: -0.01em;
  color: #1f2937;
  text-align: left;
  word-break: keep-all;
}
.cq-flow-sub,
.cq-flow-sub--proto {
  text-align: left;
}
.cq-flow-sub,
.cq-flow-sub--proto {
  margin: 0;
  font-size: var(--text-sm, 14px);
  line-height: var(--leading-normal, 1.6);
  letter-spacing: var(--tracking-korean, -0.02em);
  color: var(--text-aux, #888888);
  font-weight: 400;
  word-break: keep-all;
}
.mvp-glossary-btn.cq-glossary-btn--proto {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: var(--cq-radius-sm);
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: var(--cq-text-secondary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.mvp-glossary-btn.cq-glossary-btn--proto:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Step1 업로드: dashed 영역 + 60px 카드 2열 */
.cq-proto-upload {
  padding: 0 20px 20px;
}
.cq-upload-dropzone {
  border: 1.5px dashed #e5e7eb;
  border-radius: var(--cq-radius-lg);
  min-height: 188px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: #fafafa;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cq-upload-dropzone:hover,
.cq-upload-dropzone:focus {
  outline: none;
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.06);
}
.cq-upload-dropzone.mvp-dragover {
  border-color: #3b82f6;
  border-style: solid;
  background: #eff6ff;
}
.cq-upload-drop-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 12px;
  filter: grayscale(0.15);
}
.cq-upload-drop-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--cq-track-ui);
  color: var(--cq-text-secondary);
  margin: 0 0 6px;
  text-align: center;
  line-height: var(--cq-lh-snug);
}
.cq-upload-drop-sub {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--cq-track-ui);
  color: var(--cq-text-tertiary);
  margin: 0 0 4px;
  text-align: center;
}
.cq-upload-drop-meta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--cq-track-caps);
  color: var(--cq-text-tertiary);
  margin: 0;
  text-align: center;
}
.cq-upload-pick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}
.cq-proto-pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  padding: 8px;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--cq-radius-md);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: var(--cq-track-ui);
  color: #334155;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s ease, box-shadow 0.18s;
}
.cq-proto-pick-card:hover {
  border-color: #cbd5e1;
  background: #fafafa;
}
.cq-proto-pick-card:active {
  transform: scale(0.98);
  border-color: var(--cq-navy);
  background: #f0f4ff;
  box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.08);
}
.cq-proto-pick-ico {
  font-size: 20px;
  line-height: 1;
}
.cq-proto-pick-txt {
  font-size: 13px;
  letter-spacing: var(--cq-track-ui);
}
.cq-upload-link-ghost {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 6px 8px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--cq-track-ui);
  color: var(--cq-text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
}
.cm-upload-tip.cq-upload-honey.cq-upload-honey--proto {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  border-radius: var(--cq-radius-md);
  color: #9a3412 !important;
  font-size: 13px;
  font-weight: 500;
  line-height: var(--cq-lh-body);
  letter-spacing: var(--cq-track-body);
}

.mvp-wizard-flow .mvp-chip-btn {
  min-height: 60px;
  border: 1.5px solid #e5e7eb;
  border-radius: var(--cq-radius-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--cq-track-ui);
  color: #334155;
  line-height: var(--cq-lh-snug);
}

/* 하단 CTA */
.cq-proto-composer {
  padding-top: 14px;
  padding-left: 20px;
  padding-right: 20px;
  border-top: 1px solid #f1f5f9;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}
.cq-proto-composer .mvp-bottom-next-wrap {
  margin-top: 12px;
}
.cq-proto-composer .bottom-cta-wrap {
  margin-top: 0;
}
.cq-proto-next:disabled,
.cq-proto-next.mvp-btn--disabled {
  background: #f1f5f9 !important;
  border: 1.5px solid #e5e7eb !important;
  color: var(--cq-text-tertiary) !important;
  opacity: 1 !important;
  cursor: not-allowed;
  font-weight: 600 !important;
  letter-spacing: var(--cq-track-ui) !important;
}
.cq-proto-next:not(:disabled) {
  min-height: 54px !important;
  height: auto !important;
  border-radius: var(--cq-radius-xl) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: var(--cq-track-ui) !important;
  background: var(--cq-navy) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
}
.cq-proto-next:not(:disabled):active {
  transform: scale(0.97);
  opacity: 0.85;
}

.mvp-wizard-flow .mvp-chat-scroll {
  padding-left: 20px;
  padding-right: 20px;
}
.mvp-wizard-flow .mvp-msg {
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.6;
}
.mvp-wizard-flow .mvp-chat-input {
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-body);
  border-radius: var(--cq-radius-md);
}
.mvp-wizard-flow .mvp-usage-chat {
  letter-spacing: var(--cq-track-caps);
  font-size: 12px;
  color: var(--cq-text-tertiary);
}

/* 차수·생산국 선택 카드 */
.mvp-sc-card {
  position: relative;
  min-height: 60px;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  padding: 10px 12px !important;
  text-align: left;
  transition: transform 0.22s ease, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.mvp-sc-card.is-selected {
  border-color: #1b2b6b !important;
  background: #f0f4ff !important;
  transform: scale(1.01);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.1);
}

@keyframes mvpScCardPulse {
  0% {
    transform: scale(1);
    border-color: #e5e7eb;
  }
  45% {
    transform: scale(1.02);
    border-color: #1b2b6b;
  }
  100% {
    transform: scale(1);
    border-color: #e5e7eb;
  }
}

@keyframes mvpScCardPulseSelected {
  0%,
  100% {
    transform: scale(1.01);
  }
  50% {
    transform: scale(1.02);
  }
}

.mvp-sc-card.mvp-sc-card--pulse:not(.is-selected) {
  animation: mvpScCardPulse 0.28s ease-out;
}

.mvp-sc-card.mvp-sc-card--pulse.is-selected {
  animation: mvpScCardPulseSelected 0.28s ease-out;
}
.mvp-sc-card.is-selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #1b2b6b;
  border-radius: 3px 0 0 3px;
}
.mvp-sc-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mvp-wizard-flow .mvp-sc-card-t {
  letter-spacing: var(--cq-track-ui);
  font-weight: 600;
}
.mvp-wizard-flow .mvp-sc-card-d {
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-snug);
}

/* 결과 시트 — 네이비 헤더 */
.mvp-result-head--navy {
  background: #1b2b6b !important;
  color: #fff !important;
  border-bottom: none !important;
  margin: -16px -16px 12px;
  padding: 16px 16px 14px;
  border-radius: 0;
}
.mvp-result-head--navy .mvp-result-title {
  color: #fff !important;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: var(--cq-track-title);
  line-height: var(--cq-lh-snug);
}
.mvp-result-head--navy .mvp-summary-line--twoline {
  color: rgba(255, 255, 255, 0.88) !important;
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-body);
}
.mvp-result-head--navy .mvp-btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.mvp-result-inner .tech-sheet-h {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: var(--cq-track-title);
  line-height: var(--cq-lh-snug);
  color: var(--cq-text-primary);
}
.mvp-result-inner .mvp-table-hint {
  font-size: 13px;
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-body);
  color: var(--cq-text-secondary);
}

/* 기본정보 3열: 라벨 80px · 값 flex · 수정 */
.mvp-spec-info-row--proto {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.mvp-spec-info-row--proto .mvp-spec-info-label {
  flex: 0 0 80px;
  width: 80px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--cq-track-ui);
  color: var(--cq-text-secondary);
  line-height: var(--cq-lh-snug);
}
.mvp-spec-info-row--proto .mvp-spec-info-value {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.mvp-spec-info-row--proto .mvp-spec-info-value input,
.mvp-spec-info-row--proto .mvp-spec-info-value select {
  max-width: none;
  width: 100%;
  text-align: left;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: var(--cq-track-body);
  line-height: var(--cq-lh-snug);
}
.mvp-spec-info-edit {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  border-radius: 10px;
  color: #ca8a04;
}
.mvp-spec-info-edit:active {
  background: #fef9c3;
}
.mvp-spec-info-edit--spacer {
  visibility: hidden;
  pointer-events: none;
}

.mvp-user-input-dashed {
  border: 1.5px dashed #e5e7eb !important;
}
.mvp-spec-info-value .mvp-badge-stage {
  border-radius: 999px;
}
.mvp-spec-info-value .mvp-badge-origin {
  border-radius: 999px;
}

/* 봉제 추천: 파란 톤 + 노란 체크 */
.cq-ai-sew-proto {
  background: #eff6ff !important;
  border: none !important;
  border-left: 3px solid #3b82f6 !important;
  border-radius: 0 16px 16px 0 !important;
}
.cq-ai-sew-proto .mvp-spec-sew-h,
.cq-ai-sew-proto .mvp-spec-ai-block-sub {
  color: #1e293b;
}
.cq-ai-sew-proto .mvp-sewing-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: #f59e0b;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  box-sizing: border-box;
}
.cq-ai-sew-proto .mvp-sewing-cb:checked {
  background: #1b2b6b;
}
.cq-ai-sew-proto .mvp-sewing-cb:checked::after {
  content: "✓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.cq-ai-sew-proto .mvp-sewing-cb:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* 결과 시트 단일 탭 바 (진행 + 상태 통합) — 2026-04-18 designer-yerin: 4개 한 줄 + Navy 통일 */
.mvp-tab-progress {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: stretch;
  padding: 0 12px 12px;
}
.mvp-tab-progress-pill {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: var(--space-2, 8px) var(--space-2, 8px);
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-label, 0em);
  color: var(--cq-text-secondary);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  line-height: var(--leading-tight, 1.4);
  word-break: keep-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mvp-tab-progress-pill.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.mvp-tab-progress-pill.is-active {
  border-color: #1b2b6b;
  background: #f0f4ff;
  color: #1b2b6b;
  box-shadow: 0 0 0 1px rgba(27, 43, 107, 0.12);
  font-weight: 700;
}
.mvp-tab-progress-pill.is-pending:not(.is-active) {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #1b2b6b;
}
.mvp-tab-progress-pill.is-active.is-done {
  border-color: #1b2b6b;
}

/* 상단 탭 바 */
.mvp-tab-btn {
  border: 1.5px solid #e5e7eb !important;
  border-radius: var(--cq-radius-md) !important;
  min-height: 48px;
  font-weight: 600 !important;
  letter-spacing: var(--cq-track-ui) !important;
  line-height: var(--cq-lh-snug) !important;
}
.mvp-tab-btn.is-active {
  border-color: #1b2b6b !important;
  background: #f0f4ff !important;
  color: #1b2b6b !important;
}

/* 보내기 — 카카오 압도적 */
.mvp-share-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.mvp-btn-share-kakao {
  min-height: 56px !important;
  height: 56px !important;
  background: #fae100 !important;
  color: #3c1e1e !important;
  border: none !important;
  border-radius: var(--cq-radius-md) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: var(--cq-track-ui) !important;
  line-height: var(--cq-lh-snug) !important;
  width: 100%;
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.38);
}
.mvp-share-row-primary {
  gap: 12px;
}
.mvp-btn-share-wechat {
  min-height: 44px !important;
  height: auto !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border: 1.5px solid #e5e7eb !important;
  background: #fff !important;
  color: #334155 !important;
}

/* 사이즈: 다중 칼럼은 표 그리드 유지 + 가로 스크롤 */
.mvp-meas-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-left: -2px;
  margin-right: -2px;
  padding-left: 2px;
  padding-right: 2px;
}
.mvp-meas-matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.mvp-meas-matrix-table th,
.mvp-meas-matrix-table td {
  vertical-align: middle;
  text-align: center;
}
.mvp-meas-matrix-table .mvp-meas-part-col,
.mvp-meas-matrix-table td:first-child {
  text-align: left;
  white-space: nowrap;
}
.mvp-meas-actions-col,
.mvp-meas-actions-cell {
  width: 44px;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.mvp-del-meas-row:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.mvp-meas-inp--ai-val {
  color: #2563eb !important;
  font-weight: 600 !important;
}
.mvp-meas-inp--empty {
  border: 1.5px dashed #e5e7eb !important;
  border-radius: 10px !important;
}
.mvp-meas-inp--filled {
  border: 1.5px solid #bfdbfe !important;
  border-radius: 10px !important;
}

/* 사이즈 구성 추천 카드 (1차 샘플) */
.mvp-spec-size-comp-root {
  margin-bottom: 16px;
}
.mvp-size-comp-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.mvp-size-comp-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 14px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s ease, box-shadow 0.2s;
}
.mvp-size-comp-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.mvp-size-comp-card.is-active {
  border-color: #1b2b6b;
  background: #f0f4ff;
  box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.12);
}
.mvp-size-comp-card.is-top-pick.is-active {
  box-shadow: 0 4px 16px rgba(30, 58, 138, 0.12);
}
.mvp-size-comp-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.mvp-size-comp-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.mvp-size-comp-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.mvp-size-comp-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.mvp-size-comp-brand-tag {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.mvp-size-comp-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 6px;
}
.mvp-size-comp-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  animation: mvpSizeCompBarGrow 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes mvpSizeCompBarGrow {
  from {
    width: 0;
  }
  to {
    width: var(--mvp-bar-pct, 0%);
  }
}
.mvp-size-comp-pct-label {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 8px;
}
.mvp-size-comp-desc {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}
.mvp-size-comp-when {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}
.mvp-size-comp-when strong {
  color: #334155;
}
.mvp-size-comp-editor {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px dashed #cbd5e1;
  background: #fafafa;
}
.mvp-size-comp-editor-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}
.mvp-size-comp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 8px;
}
.mvp-size-comp-size-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 14px;
  font-weight: 600;
  color: #1e40af;
}
.mvp-size-comp-tag-remove {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 4px;
}
.mvp-size-comp-tag-remove:hover {
  color: #dc2626;
  background: #fee2e2;
}
.mvp-size-comp-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.mvp-size-comp-add-row .mvp-size-comp-add-input {
  flex: 1;
  margin: 0;
}
.mvp-size-comp-add-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── 로그인/회원가입 소프트 입력 ─── */
.mvp-auth-body .mvp-auth-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 14px;
}
.mvp-auth-tab {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
}
.mvp-auth-tab.is-active {
  border-color: #1b2b6b;
  background: #f0f4ff;
  color: #1b2b6b;
}
.mvp-form-soft .mvp-inp-wrap {
  position: relative;
  margin-bottom: 12px;
}
.cq-soft-inp {
  width: 100%;
  box-sizing: border-box;
  height: 52px;
  padding: 0 44px 0 16px;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-size: 16px;
  color: #0f172a;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.cq-soft-inp::placeholder {
  color: #94a3b8;
}
.cq-soft-inp:focus {
  outline: none;
  border-color: #1b2b6b;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}
.mvp-inp-check {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #16a34a;
  font-weight: 700;
  font-size: 15px;
  pointer-events: none;
}

/* ─── 메인 홈 /app ─── */
.main-home-body .mvp-main.main-home {
  max-width: 420px;
  margin: 0 auto;
}
.home-greeting {
  padding: 8px 4px 4px;
}
.greeting-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.greeting-sub {
  margin-top: 6px;
  font-size: 0.95rem;
  color: #64748b;
}
.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 24px;
  height: 64px;
  padding: 0 22px;
  border: none;
  border-radius: 20px;
  background: #1b2b6b;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, opacity 0.12s;
}
.home-cta:active {
  transform: scale(0.99);
  opacity: 0.95;
}
.home-cta__arrow {
  font-size: 1.5rem;
  font-weight: 500;
  opacity: 0.95;
}
.recent-section {
  margin-top: 32px;
}
.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}
.recent-header a {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}
.recent-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  padding: 20px 8px;
}
.recent-card {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.recent-card:active {
  background: #f8fafc;
}
.recent-card__title {
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
}
.recent-card__meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

/* AI 뱃지 행 + 수정 가능 */
.mvp-ai-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.mvp-ai-editable-hint {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

/* 결과 기본정보 순차 fade-in */
@keyframes cqFadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mvp-basic-tab-root > .cq-fade-seq {
  opacity: 0;
  animation: cqFadeInUp 0.42s ease forwards;
  animation-delay: var(--cq-fade-delay, 0s);
}

/* 차수 선택 후 생산국 슬라이드업 */
.mvp-sc-country-block {
  max-height: 0;
  opacity: 0.35;
  transform: translateY(10px);
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.45s ease, opacity 0.35s ease, transform 0.35s ease;
}
.mvp-sc-country-block.mvp-sc-revealed {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: 8px;
}

/* 사이즈 placeholder (평균) */
.tech-meas-input.mvp-meas-inp::placeholder,
input.mvp-meas-inp--empty::placeholder {
  color: #cbd5e1;
}

/* 봉제 체크 스케일 */
@keyframes mvpCbPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}
.cq-ai-sew-proto .mvp-sewing-cb.mvp-cb-anim {
  animation: mvpCbPop 0.22s ease;
}

/* ── 플로우 UX: 스텝 전환 · 간격 · 메시지 등장 ── */
@keyframes mvpFlowEnterNext {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mvpFlowEnterPrev {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#flowHead.mvp-flow-enter-next {
  animation: mvpFlowEnterNext 200ms ease-out both;
}

#flowHead.mvp-flow-enter-prev {
  animation: mvpFlowEnterPrev 200ms ease-out both;
}

.mvp-msg-enter {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.38s ease-out, transform 0.38s ease-out;
  transition-delay: var(--mvp-msg-stagger, 0ms);
}

.mvp-msg-enter.mvp-msg-enter--on {
  opacity: 1;
  transform: translateY(0);
}

.mvp-wizard-flow .mvp-chat-msgs {
  gap: 24px;
}

.mvp-wizard-flow .mvp-flow-head.cq-proto-flow-head {
  padding-bottom: 24px;
}

/* 1단계 업로드: 제목 ↔ 업로드 박스 간격 축소 */
.mvp-wizard-flow .mvp-flow-head.cq-proto-flow-head:has(+ .mvp-chat-layout .mvp-upload-panel:not(.hidden)) {
  padding-bottom: 12px;
}
.mvp-wizard-flow
  .mvp-flow-head.cq-proto-flow-head:has(+ .mvp-chat-layout .mvp-upload-panel:not(.hidden))
  .cq-flow-title {
  margin-bottom: 6px;
}
.mvp-wizard-flow
  .mvp-flow-head.cq-proto-flow-head:has(+ .mvp-chat-layout .mvp-upload-panel:not(.hidden))
  .cq-q-tag {
  margin-bottom: 8px;
}
.mvp-wizard-flow .upload-zone {
  padding: 22px 14px;
  margin-bottom: 8px;
}
.mvp-wizard-flow .upload-icon-wrap {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}
.mvp-wizard-flow .upload-btns {
  margin-bottom: 8px;
}
.mvp-wizard-flow .upload-btn {
  height: 46px;
}

.mvp-wizard-flow .mvp-sc-card {
  padding: 16px !important;
}

.mvp-wizard-flow .cq-flow-sub,
.mvp-wizard-flow .cq-flow-sub--proto,
.mvp-wizard-flow .mvp-flow-extra {
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* 2026-04-18 대표 지시: nav ↔ 타이틀 간격을 /app .dash (20px/32px) 와 동일하게. */
.mvp-wizard-flow .mvp-upload-panel {
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 20px;
  padding-bottom: 12px;
}
.mvp-wizard-flow .mvp-upload-panel.page-body {
  padding-top: 20px;
  padding-bottom: 12px;
}
@media (min-width: 769px) {
  .mvp-wizard-flow .mvp-upload-panel,
  .mvp-wizard-flow .mvp-upload-panel.page-body {
    padding-top: 32px;
    padding-left: 24px;
    padding-right: 24px;
  }
}

.mvp-wizard-flow .cq-proto-composer {
  padding-top: 24px;
}

/* ── 반응형: 태블릿 ── */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --cq-shell: 680px; }

  /* 확정 UI 카드 */
  .cq-confirm-wrap { max-width: 100%; }
  .cq-ai-bubble { max-width: 100%; font-size: 15px; }

  /* 프로토 플로우 */
  .mvp-flow-head.cq-proto-flow-head { max-width: 680px; margin-left: auto; margin-right: auto; }
  .cq-proto-composer { max-width: 680px; margin-left: auto; margin-right: auto; }

  /* 수정사항 카드 */
  .cq-sum-card { padding: 16px; }
  .cq-sum-item { padding: 12px 0; }
}

/* ── 반응형: PC ── */
@media (min-width: 1025px) {
  :root { --cq-shell: 800px; }

  .cq-confirm-wrap { max-width: 100%; }
  .cq-ai-bubble { max-width: 100%; font-size: 15px; line-height: 1.6; }

  .mvp-flow-head.cq-proto-flow-head { max-width: 800px; margin-left: auto; margin-right: auto; }
  .cq-proto-composer { max-width: 800px; margin-left: auto; margin-right: auto; }

  .cq-sum-card { padding: 20px; }
  .cq-sum-item { padding: 14px 0; }

  /* 메인 홈 */
  .main-home-body .mvp-main.main-home { max-width: 640px; }
}
