/* ═══════════════════════════════════════════════
   AI 웍스 — 통합 스타일
   ═══════════════════════════════════════════════ */

/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #3D5AFE;
  --primary-light: #E8EEFF;
  --primary-dark: #2A3FD8;
  --success: #00C471;
  --success-light: #E6FBF3;
  --danger: #FF4D6D;
  --danger-light: #FFEEF1;
  --warning: #FF9100;
  --warning-light: #FFF4E5;
  --gray-50: #F8F9FC;
  --gray-100: #F1F3F8;
  --gray-200: #E4E8F0;
  --gray-300: #CDD2DE;
  --gray-400: #9AA3B4;
  --gray-500: #6B7588;
  --gray-600: #4A5167;
  --gray-700: #353A50;
  --gray-800: #1E2235;
  --gray-900: #0D1025;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 6px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.14);
  --shadow-xl: 0 24px 64px rgba(0,0,0,.18);
  --transition: .22s cubic-bezier(.4,0,.2,1);
}


.calendar-icon{
    z-index: 0;
}
/* ── 배경 씬 ── */
.bg-scene {

    position: fixed;   /* 핵심 */
    inset: 0;
    z-index: 1001;
/*
    background: radial-gradient(
        ellipse at 20% 10%,
        #1a1f3a 0%,
        #0A0F1E 60%
    );
*/
    background: radial-gradient(
        ellipse at 20% 10%,
        rgba(26,31,58,0.55) 0%,   /* 밝은 부분 투명도 */
        rgba(10,15,30,0.65) 60%   /* 어두운 부분 투명도 */
    );

}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .45;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-1 { width: 480px; height: 480px; left: -100px; top: -80px;
  background: radial-gradient(circle, #3D5AFE 0%, transparent 70%);
  animation-duration: 11s; }
.orb-2 { width: 360px; height: 360px; right: -60px; bottom: -60px;
  background: radial-gradient(circle, #7C4DFF 0%, transparent 70%);
  animation-duration: 14s; animation-delay: -4s; }
.orb-3 { width: 280px; height: 280px; left: 40%; top: 60%;
  background: radial-gradient(circle, #00C471 0%, transparent 70%);
  animation-duration: 16s; animation-delay: -7s; opacity: .25; }
@keyframes orbFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.12); }
}

/* ── 모달 래퍼 ── */
.modal-wrap {
  position: fixed; inset: 0; 
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 1002;
}

.modal2 {
    position: relative;
    width: 100%;
    max-width: 580px;
    max-height: calc(-32px + 100vh);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    background: rgb(255, 255, 255);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0s 1 normal none running modalIn;
    z-index: 1002;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── 헤더 ── */
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  flex-shrink: 0;
  z-index: 1002;
}

/* ── 스텝퍼 ── */
.stepper {
  display: flex; align-items: center; gap: 0;
  flex: 1; overflow: hidden;
}
.step-node {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.step-bubble {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  transition: var(--transition);
}
.step-bubble.done {
  background: var(--success); color: #fff;
}
.step-bubble.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 0 0 4px rgba(61,90,254,.2);
  animation: stepPulse 2s ease-in-out infinite;
}
.step-bubble.pending {
  background: var(--gray-200); color: var(--gray-400);
}
@keyframes stepPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(61,90,254,.2); }
  50%      { box-shadow: 0 0 0 8px rgba(61,90,254,.08); }
}
.step-label {
  font-size: 11px; font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
}
.step-label.active { color: var(--primary); }
.step-label.done   { color: var(--success); }
.step-connector {
  flex: 1; height: 2px; min-width: 16px; max-width: 40px;
  background: var(--gray-200);
  transition: background var(--transition);
}
.step-connector.done { background: var(--success); }

.close-btn {
  width: 32px; height: 32px; border: none; background: var(--gray-100);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--gray-500); flex-shrink: 0;
  transition: var(--transition);
}
.close-btn:hover { background: var(--gray-200); color: var(--gray-700); }

/* ── 바디 ── */
.modal-body2 {
  flex: 1; overflow-y: auto;
  scroll-behavior: smooth;
}
.modal-body2::-webkit-scrollbar { width: 4px; }
.modal-body2::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

/* ── 스텝 패널 ── */
.step-panel {
  display: none; padding: 24px;
  animation: panelIn .3s ease;
}
.step-panel.active { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.step-panel.slide-back { animation: panelBack .3s ease; }
@keyframes panelBack {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── 스텝 인트로 ── */
.step-intro { text-align: center; margin-bottom: 28px; }
.step-intro.compact { margin-bottom: 20px; }

.step-emoji-wrap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px; margin-bottom: 16px;
}
.step-emoji-wrap.small {
  width: 64px; height: 64px; margin-bottom: 12px;
}
.step-emoji { font-size: 40px; position: relative; z-index: 2; }
.step-emoji-wrap.small .step-emoji { font-size: 32px; }
.step-icon-img {
  width: 52px; height: 52px;
  object-fit: contain;
  position: relative; z-index: 2;
}
.ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(61,90,254,.3);
  animation: ringOut 2.4s ease-out infinite;
}
.ring.r1 { width: 72px; height: 72px; }
.ring.r2 { width: 88px; height: 88px; animation-delay: .8s; }
@keyframes ringOut {
  0%   { transform: scale(.8); opacity: .7; }
  100% { transform: scale(1.3); opacity: 0; }
}

.step-title {
  font-size: 22px; font-weight: 800;
  color: var(--gray-900); letter-spacing: -.5px;
  margin-bottom: 8px;
}
.step-desc {
  font-size: 14px; color: var(--gray-400); line-height: 1.65;
}

/* ════════ STEP 1 : 업종 그리드 ════════ */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.industry-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
  position: relative;
  overflow: hidden;
}
.industry-card::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.industry-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61,90,254,.18);
}
.industry-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.industry-card.selected .check-badge-ic {
  display: flex;
}
.check-badge-ic {
  display: none;
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px;
  background: var(--primary);
  border-radius: 50%;
  align-items: center; justify-content: center;
  color: #fff; font-size: 10px;
  animation: checkPop .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes checkPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.ic-icon { font-size: 28px; margin-bottom: 6px; }
.ic-name { font-size: 13px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
.ic-sub  { font-size: 11px; color: var(--gray-400); }

.hint-banner {
  background: linear-gradient(135deg, var(--primary-light), #f0f3ff);
  border: 1px solid rgba(61,90,254,.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px; color: var(--primary-dark);
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════ STEP 2 : 폼 ════════ */
.form-section {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.field-label-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.field-label {
  font-size: 14px; font-weight: 700; color: var(--gray-800);
}
.badge-required {
  font-size: 10px; font-weight: 700; color: #fff;
  background: var(--danger);
  padding: 2px 7px; border-radius: 20px;
}
.input-wrap { position: relative; }
.text-input {
  width: 100%;
  height: 48px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0 44px 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: #fff;
  outline: none;
}
.text-input::placeholder { color: var(--gray-300); }
.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(61,90,254,.12);
}
.text-input.valid   { border-color: var(--success); }
.text-input.invalid { border-color: var(--danger); }
.input-status {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.place-id-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  background: var(--success-light);
  border: 1px solid rgba(0,196,113,.25);
  font-size: 12px; color: #00A862; font-weight: 600;
  animation: fadeUp .3s ease;
}
.field-hint {
  font-size: 12px; color: var(--gray-400); line-height: 1.55;
}

/* 가이드 아코디언 */
.guide-toggle-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--success-light);
  border: 1.5px solid rgba(0,196,113,.3);
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; color: #00A862;
  cursor: pointer;
  transition: var(--transition);
  width: fit-content;
}
.guide-toggle-btn:hover { background: #d0f5e8; }
.toggle-icon { transition: transform var(--transition); }
.toggle-icon.open { transform: rotate(180deg); }

.guide-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height .5s cubic-bezier(.4,0,.2,1), opacity .4s ease;
  opacity: 0;
}
.guide-panel.open {
  max-height: 1200px;
  opacity: 1;
}
.guide-panel-inner {
  border: 1.5px solid rgba(0,196,113,.2);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f0fdf8 0%, #f8fff5 100%);
  margin-top: 8px;
}
.guide-content {
  padding: 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.guide-block { display: flex; flex-direction: column; gap: 12px; }
.guide-block-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: var(--gray-800);
}
.guide-num {
  width: 26px; height: 26px;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}

.rank-card-body .guide-step .guide-num {
  font-size: 10px; font-weight: 800;
}

.screenshot-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.guide-screenshot {
  width: 100%; display: block;
  object-fit: contain;
  max-height: 260px;
  transition: filter var(--transition);
}
.guide-screenshot.mobile-img { max-height: 380px; }
.guide-screenshot:hover { filter: brightness(1.04); }
.screenshot-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 5px;
}
.pc-badge     { background: #EEF2FF; color: var(--primary); border: 1px solid rgba(61,90,254,.2); }
.mobile-badge { background: #FFF0F6; color: #E91E8C;         border: 1px solid rgba(233,30,140,.2); }
.url-highlight-box {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(255,77,109,.88);
  color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 6px 12px;
  display: flex; align-items: center; gap: 6px;
  animation: pulseBar 2s ease-in-out infinite;
}
@keyframes pulseBar {
  0%,100% { opacity: .9; } 50% { opacity: 1; }
}

.guide-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.guide-step-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--gray-600); line-height: 1.55;
}
.step-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.highlight-blue { color: var(--primary); font-weight: 700; }

.tip-box {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--warning-light);
  border: 1.5px solid rgba(255,145,0,.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px; color: var(--gray-600); line-height: 1.6;
}
.tip-box .fa-lightbulb { color: var(--warning); font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.tip-box code {
  background: rgba(255,145,0,.12); padding: 1px 6px; border-radius: 4px;
  font-size: 12px; font-family: monospace; color: var(--warning);
}

/* 순위 카드 */
.rank-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.rank-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}
.rank-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61,90,254,.14);
}
.rank-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.rank-icon  { font-size: 26px; margin-bottom: 8px; }
.rank-label { font-size: 15px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.rank-desc  { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.rank-tags  { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-gray { background: var(--gray-100);      color: var(--gray-500); }

/* ════════ STEP 3 : 검수 ════════ */
/* 수정 버튼 (통합 카드 안) */
.vc-edit-btn {
  flex-shrink: 0;
  height: 28px; padding: 0 11px;
  border: 1.5px solid var(--gray-200); border-radius: 20px;
  background: #fff; cursor: pointer;
  color: var(--gray-500); font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.vc-edit-btn:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}

/* 통합 검수 카드 2개 */
.checklist {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}
.check-item {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #fff;
  transition: border-color var(--transition), background var(--transition);
}
.check-item.checking { border-color: rgba(61,90,254,.35); background: #fafbff; }
.check-item.passed   { border-color: rgba(0,196,113,.4);  background: #f6fdf9; }
.check-item.failed   { border-color: rgba(255,77,109,.4); background: #fff7f8; }

.check-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  transition: var(--transition);
}
.check-icon.idle     { background: var(--gray-100); color: var(--gray-400); opacity: 1; }
.check-icon.checking { background: rgba(61,90,254,.12); color: var(--primary);
  animation: spin .8s linear infinite; }
.check-icon.passed   { background: var(--success-light); color: var(--success); }
.check-icon.failed   { background: var(--danger-light);  color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }

.check-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
/* 라벨 (작은 회색) */
.check-label {
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  display: flex; align-items: center; gap: 5px;
}
/* 입력값 (굵고 크게) */
.check-value {
  font-size: 15px; font-weight: 800; color: var(--gray-900);
  word-break: break-all; line-height: 1.4;
}
.check-value.url-val { font-size: 12.5px; font-weight: 700; color: var(--primary); }
/* 안내 문구 */
.check-sub {
  font-size: 11.5px; color: var(--gray-400); line-height: 1.4;
}
.check-item.checking .check-label { color: var(--primary); }
.check-item.checking .check-value  { color: var(--primary); }
.check-item.passed   .check-label  { color: #00A862; }
.check-item.failed   .check-label  { color: var(--danger); }
/* 우측 : 수정 버튼 + 배지 가로 배치 */
.check-right {
  display: flex; flex-direction: row;
  align-items: center; gap: 8px;
  flex-shrink: 0;
  align-self: center;
}

/* 인라인 편집 */
.inline-edit-wrap {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 0;
}
.inline-edit-input {
  flex: 1;
  height: 34px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  color: var(--gray-800);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61,90,254,.1);
  transition: var(--transition);
  min-width: 0;
}
.inline-edit-input:focus {
  box-shadow: 0 0 0 4px rgba(61,90,254,.15);
}
.ie-confirm-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  border: none; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.ie-confirm-btn:hover { background: var(--primary-dark); }

/* 편집 중 카드 강조 */
.check-item.editing {
  border-color: var(--primary);
  background: #fafbff;
}

.check-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; flex-shrink: 0;
  transition: var(--transition);
}
.check-badge.idle     { background: var(--gray-100); color: var(--gray-400); }
.check-badge.checking { background: rgba(61,90,254,.12); color: var(--primary); }
.check-badge.passed   { background: var(--success-light); color: var(--success); }
.check-badge.failed   { background: var(--danger-light);  color: var(--danger); }

/* 결과 박스 */
.result-box {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px; line-height: 1.6;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 12px;
  animation: fadeUp .4s ease;
}
.result-box .result-icon-wrap {
  font-size: 22px; flex-shrink: 0; margin-top: 1px;
}
.result-box .result-text { flex: 1; }
.result-box strong { font-weight: 800; display: block; margin-bottom: 3px; font-size: 14px; }
.result-box.success {
  background: var(--success-light);
  border: 1.5px solid rgba(0,196,113,.35);
  color: #00704A;
}
.result-box.failed {
  background: var(--danger-light);
  border: 1.5px solid rgba(255,77,109,.35);
  color: #C0203F;
}

.btn-verify {
  width: 100%; height: 52px;
  border: none; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(61,90,254,.35);
  margin-bottom: 10px;
}
.btn-verify:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(61,90,254,.4);
}
.btn-verify:active { transform: translateY(0); }
.btn-verify.loading {
  background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
  color: #fff; cursor: not-allowed; box-shadow: none; transform: none;
  opacity: .8;
}
.btn-verify.done-btn {
  display: none; /* 검수 완료 후 버튼 숨김 — 푸터 다음 버튼만 노출 */
}
.btn-verify i.fa-spinner { animation: spin .8s linear infinite; }
.verify-hint {
  text-align: center; font-size: 12px; color: var(--gray-400);
  margin-bottom: 4px;
}

/* ════════ STEP 4 : AI 분석 ════════ */

/* 로봇 히어로 */
.ai-hero {
  text-align: center;
  margin-bottom: 28px;
}
.ai-robot-wrap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 96px; height: 96px;
  margin-bottom: 18px;
}
.ai-robot-emoji {
  font-size: 52px;
  position: relative; z-index: 2;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(61,90,254,.25));
  transition: transform .3s ease;
}
.ai-robot-wrap.running .ai-robot-emoji {
  animation: robotBob .9s ease-in-out infinite alternate;
}
@keyframes robotBob {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
.ai-ring {
  position: absolute; border-radius: 50%;
  border: 2px solid rgba(61,90,254,.2);
  animation: aiRingOut 2.6s ease-out infinite;
}
.ai-ring.ar1 { width: 76px; height: 76px; }
.ai-ring.ar2 { width: 96px; height: 96px; animation-delay: 1s; }
@keyframes aiRingOut {
  0%   { transform: scale(.85); opacity: .6; }
  100% { transform: scale(1.35); opacity: 0; }
}
.ai-title {
  font-size: 22px; font-weight: 800;
  color: var(--gray-900); letter-spacing: -.5px;
  margin-bottom: 6px;
}
.ai-sub {
  font-size: 13.5px; color: var(--gray-400); line-height: 1.6;
}

/* 프로그레스 바 */
.ai-progress-wrap {
  margin-bottom: 20px;
}
.ai-progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}
.ai-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), #6C8EFF);
  transition: width .6s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.ai-progress-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  from { left: -100%; }
  to   { left: 100%; }
}
.ai-progress-labels {
  display: flex; justify-content: space-between;
}
.apl {
  font-size: 10.5px; font-weight: 600; color: var(--gray-300);
  transition: color .3s ease;
  flex: 1; text-align: center;
}
.apl:first-child { text-align: left; }
.apl:last-child  { text-align: right; }
.apl.active { color: var(--primary); }
.apl.done   { color: var(--success); }

/* AI 체크리스트 */
.ai-checklist {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}
.ai-check-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--gray-400);
  font-weight: 500;
  transition: color .3s ease;
  opacity: .45;
}
.ai-check-item.active {
  color: var(--primary);
  opacity: 1;
}
.ai-check-item.done {
  color: var(--success);
  opacity: 1;
  font-weight: 700;
}
.ai-check-icon {
  font-size: 17px;
  width: 20px; flex-shrink: 0;
  transition: var(--transition);
}

/* 분석 결과 카드 */
.ai-result-card {
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f5ee 100%);
  border: 1.5px solid rgba(61,90,254,.2);
  animation: fadeUp .5s ease;
}
.ai-result-card .arc-title {
  font-size: 16px; font-weight: 800; color: var(--gray-900);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.ai-result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ai-result-item {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
}
.ai-result-item .ari-label {
  font-size: 10.5px; font-weight: 700; color: var(--gray-400);
  margin-bottom: 4px;
}
.ai-result-item .ari-value {
  font-size: 15px; font-weight: 800; color: var(--gray-900);
}
.ai-result-item .ari-value.accent { color: var(--primary); }
.ai-result-item .ari-value.success { color: var(--success); }

/* AI 시작 버튼 */
.btn-ai-start {
  width: 100%; height: 54px;
  border: none; border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1a1a2e 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(61,90,254,.4);
  font-family: inherit;
  position: relative; overflow: hidden;
}
.btn-ai-start::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.btn-ai-start:hover::before { transform: translateX(100%); }
.btn-ai-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(61,90,254,.5);
}
.btn-ai-start:active { transform: translateY(0); }
.btn-ai-start:disabled {
  background: var(--gray-200); color: var(--gray-400);
  box-shadow: none; cursor: not-allowed; transform: none;
}
.btn-ai-start.running {
  background: linear-gradient(135deg, #1a1a2e 0%, var(--primary-dark) 100%);
  cursor: not-allowed;
  animation: btnPulse 1.5s ease-in-out infinite;
}
@keyframes btnPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(61,90,254,.4); }
  50%      { box-shadow: 0 4px 32px rgba(61,90,254,.7); }
}
.btn-ai-start i.fa-spinner { animation: spin .8s linear infinite; }

/* ════════ STEP 5 : 분석 결과 ════════ */

/* 히어로 영역 */
.s5-hero {
  text-align: center;
  padding: 8px 0 20px;
}
.s5-status-icon {
  width: 68px; height: 68px;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  margin-bottom: 16px;
  position: relative;
}
.s5-status-icon.success {
  background: linear-gradient(135deg, #00C471, #00a855);
  box-shadow: 0 8px 24px rgba(0,196,113,.35);
  animation: iconPop .5s cubic-bezier(.34,1.56,.64,1);
}
.s5-status-icon.fail {
  background: linear-gradient(135deg, #FF4D6D, #e0354f);
  box-shadow: 0 8px 24px rgba(255,77,109,.35);
  animation: iconPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes iconPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.s5-title {
  font-size: 22px; font-weight: 800;
  color: var(--gray-900); letter-spacing: -.4px;
  margin-bottom: 6px;
}
.s5-meta {
  font-size: 12px; color: var(--gray-400);
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.s5-meta .pipe { color: var(--gray-300); }

/* ─── 실패 배너 ─── */
.s5-notice {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px; line-height: 1.65;
  margin-bottom: 18px;
  display: flex; gap: 10px; align-items: flex-start;
  animation: fadeUp .4s ease;
}
.fail-notice {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}
.fail-notice .fa-thumbtack { color: #3B82F6; font-size: 15px; margin-top: 2px; flex-shrink: 0; }

/* ════════ 추천 검색어 섹션 ════════ */

.kw-section {
  margin-bottom: 22px;
  animation: fadeUp .45s ease;
}

/* ── 섹션 타이틀 행 ── */
.kw-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.kw-header-left  { display: flex; align-items: center; gap: 8px; }
.kw-header-icon  {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(124,58,237,.3);
}
.kw-header-title { font-size: 13px; font-weight: 800; color: var(--gray-800); }
.kw-header-sub   { font-size: 11px; color: var(--gray-400); margin-top: 1px; }

/* 선택 여부 상태 칩 */
.kw-select-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  background: #FEF2F2; color: #DC2626;
  border: 1.5px solid #FECACA;
  transition: background .25s, color .25s, border-color .25s;
}
.kw-select-badge.selected {
  background: #F0FDF4; color: #16A34A;
  border-color: #BBF7D0;
}
.kw-select-badge i { font-size: 11px; }

/* ── 리스트 컨테이너 ── */
.kw-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── 개별 항목 행 ──
   [ 순번 ]  검색어 텍스트 + 메타   [검색량 바]  선택 버튼
*/
.kw-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #FAFAFA;
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  outline: none;
  position: relative;
  transition:
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}
.kw-card:hover:not(.selected) {
  background: #F5F7FF;
  border-color: #C7D0FF;
}
.kw-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(124,58,237,.2);
}
.kw-card.selected {
  background: #F5F3FF;
  border-color: #7C3AED;
  box-shadow: 0 2px 12px rgba(124,58,237,.12);
}

/* 왼쪽: 순번 원형 */
.kw-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.kw-card.selected .kw-num {
  background: #7C3AED;
  color: #fff;
}

/* 중앙: 검색어 + 메타 */
.kw-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kw-keyword {
  font-size: 14px; font-weight: 800;
  color: var(--gray-900);
  word-break: keep-all;
  line-height: 1.3;
  transition: color .2s;
}
.kw-card.selected .kw-keyword { color: #5B21B6; }

.kw-pills {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.kw-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.kw-pill.vol-high   { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.kw-pill.vol-mid    { background: #FFFBEB; color: #D97706; border-color: #FDE68A; }
.kw-pill.vol-low    { background: #F0FDF4; color: #16A34A; border-color: #BBF7D0; }
.kw-pill.comp-high  { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.kw-pill.comp-mid   { background: #FFFBEB; color: #D97706; border-color: #FDE68A; }
.kw-pill.comp-low   { background: #F0FDF4; color: #16A34A; border-color: #BBF7D0; }
.kw-pill i { font-size: 8px; }

/* 오른쪽: 선택 버튼 */
.kw-pick-btn {
  flex-shrink: 0;
  width: 60px; height: 32px;
  border-radius: 99px;
  border: 1.5px solid var(--gray-300);
  background: #fff;
  color: var(--gray-500);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  pointer-events: none; /* 카드 전체가 클릭 영역 */
}
.kw-pick-btn i { font-size: 10px; }
.kw-card:hover:not(.selected) .kw-pick-btn {
  border-color: #7C3AED;
  color: #7C3AED;
  background: #F5F3FF;
}
.kw-card.selected .kw-pick-btn {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #fff;
  box-shadow: 0 3px 10px rgba(124,58,237,.3);
}

/* 선택 애니메이션 */
@keyframes kwSelect {
  0%   { transform: scale(.95); }
  55%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.kw-card.selected { animation: kwSelect .25s ease; }

/* ─── 실패 로봇 ─── */
.s5-robot-wrap {
  position: relative; text-align: center;
  margin: 10px 0 28px;
}
.s5-robot-emoji {
  font-size: 86px; display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.14));
  animation: robotFloat 3s ease-in-out infinite alternate;
}
@keyframes robotFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
.s5-robot-question {
  position: absolute; top: -6px; right: calc(50% - 76px);
  font-size: 34px;
  animation: floatQ 2.2s ease-in-out infinite alternate;
}
@keyframes floatQ {
  from { transform: translateY(0) rotate(-10deg); }
  to   { transform: translateY(-12px) rotate(10deg); }
}

/* ─── 통계 카드 3개 ─── */
.s5-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.s5-stat {
  border-radius: var(--radius-md); padding: 14px 10px;
  text-align: center; animation: fadeUp .4s ease both;
}
.s5-stat:nth-child(1) { animation-delay: .05s; }
.s5-stat:nth-child(2) { animation-delay: .1s;  }
.s5-stat:nth-child(3) { animation-delay: .15s; }
.s5-stat.purple { background: #F5F3FF; border: 1.5px solid #DDD6FE; }
.s5-stat.orange { background: #FFFBEB; border: 1.5px solid #FDE68A; }
.s5-stat.green  { background: #F0FDF4; border: 1.5px solid #BBF7D0; }
.s5-stat-label {
  font-size: 10.5px; font-weight: 700; color: var(--gray-400);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px;
}
.s5-stat-value {
  font-size: 28px; font-weight: 900;
  margin-bottom: 4px; line-height: 1;
}
.s5-stat.purple .s5-stat-value { color: #7C3AED; }
.s5-stat.orange .s5-stat-value { color: #D97706; font-size: 26px; font-weight: 800; }
.s5-stat.green  .s5-stat-value { color: #16A34A; }
.s5-stat-sub { font-size: 10.5px; color: var(--gray-400); line-height: 1.4; }

/* ─── 탭 ─── */
.s5-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 0;
}
.s5-tab {
  flex: 1; padding: 11px 8px;
  border: none; background: none;
  font-size: 13px; font-weight: 600;
  color: var(--gray-400); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-family: inherit;
}
.s5-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 800;
}
.s5-tab:hover:not(.active) { color: var(--gray-600); }

/* ─── 전략 테이블 ─── */
.s5-table-wrap { margin-bottom: 14px; }
.s5-table-header {
  display: grid;
  grid-template-columns: 26px 1fr 64px 42px 50px;
  padding: 9px 8px; gap: 8px;
  font-size: 11px; font-weight: 700; color: var(--gray-400);
  border-bottom: 1.5px solid var(--gray-200);
  letter-spacing: .3px;
}
.s5-table-header span:not(:first-child) { text-align: center; }
.s5-table-row {
  display: grid;
  grid-template-columns: 26px 1fr 64px 42px 50px;
  padding: 11px 8px; gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
  animation: fadeUp .3s ease both;
  transition: background var(--transition);
}
.s5-table-row:hover { background: var(--gray-50); }
.s5-row-check {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; flex-shrink: 0;
}
.s5-row-type  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s5-row-name  {
  font-size: 13px; font-weight: 700; color: var(--gray-800);
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.s5-row-sub   { font-size: 11px; color: var(--gray-400); }
.s5-info-tag  {
  font-size: 10px; font-weight: 700; color: #D97706;
  background: #FEF3C7; border: 1px solid #FDE68A;
  padding: 1px 7px; border-radius: 4px; white-space: nowrap;
}
.s5-row-qty { font-size: 13px; font-weight: 800; color: var(--primary); text-align: center; }
.s5-row-dur { font-size: 12px; color: var(--gray-400); text-align: center; }
.s5-badge {
  font-size: 10px; font-weight: 800;
  padding: 3px 6px; border-radius: 6px; text-align: center;
  white-space: nowrap;
}
.s5-badge.essential { background: #FEE2E2; color: #DC2626; }
.s5-badge.recommend { background: #DBEAFE; color: #1D4ED8; }
.s5-badge.optional  { background: var(--gray-100); color: var(--gray-500); }

/* ─── 비용 배너 ─── */
.s5-cost-banner {
  background: linear-gradient(135deg, #FFFBEB, #FFF7D1);
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: 13.5px; color: var(--gray-700);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 6px;
  animation: fadeUp .4s ease;
}
.s5-cost-banner strong {
  font-size: 16px; font-weight: 900; color: var(--gray-900);
}

/* ─── 하단 버튼 공통 ─── */
.s5-btns {
  display: flex; gap: 10px;
  padding-bottom: 4px;
}
.s5-btn-outline {
  flex: 1; height: 48px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #fff; color: var(--gray-700);
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.s5-btn-outline:hover {
  border-color: var(--gray-500);
  background: var(--gray-50);
}
.s5-btn-primary {
  flex: 1.6; height: 48px; border: none;
  border-radius: var(--radius-md);
  background: var(--gray-200); color: var(--gray-400);
  font-size: 14px; font-weight: 700;
  cursor: not-allowed;
  transition: var(--transition);
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.s5-btn-primary.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; cursor: pointer;
  box-shadow: 0 4px 16px rgba(61,90,254,.35);
}
.s5-btn-primary.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61,90,254,.45);
}

/* ── 푸터 ── */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  flex-shrink: 0;
}
.btn-prev, .btn-next {
  height: 44px; padding: 0 22px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; transition: var(--transition); border: none;
}
.btn-prev {
  background: var(--gray-100); color: var(--gray-500);
}
.btn-prev:not(:disabled):hover {
  background: var(--gray-200); color: var(--gray-700);
}
.btn-prev:disabled { opacity: .4; cursor: not-allowed; }
.btn-next {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(61,90,254,.3);
}
.btn-next:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61,90,254,.4);
}
.btn-next:disabled { background: var(--gray-200); color: var(--gray-400); box-shadow: none; cursor: not-allowed; }
.footer-hint {
  flex: 1; font-size: 12px; color: var(--gray-400); text-align: center;
}

/* ── 토스트 ── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-800); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: 24px;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 9999; white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success-toast { background: var(--success); }
.toast.error-toast   { background: var(--danger); }

/* ─────────────────────────────────────
   레이어 팝업 전용 반응형
   레이아웃 변경 없이 크기만 조절
   기존 반응형 구간 교체
   ───────────────────────────────────── */

@media (max-width: 1024px) {
  .modal-wrap {
    padding: 20px;
  }

  .modal2 {
    max-width: 760px;
    max-height: calc(80vh - 40px);
  }
}

@media (max-width: 768px) {
  .modal-wrap {
    padding: 16px;
  }

  .modal2 {
    width: 100%;
    max-width: 680px;
    max-height: calc(76vh - 32px);
    border-radius: 24px;
  }

  .modal-header {
    padding: 18px 20px 14px;
  }

  .step-panel {
    padding: 20px;
  }

  .modal-footer {
    padding: 14px 20px;
  }

  .step-title,
  .ai-title,
  .s5-title {
    font-size: 20px;
  }

  .step-desc,
  .ai-sub {
    font-size: 13px;
  }

  .step-emoji-wrap {
    width: 76px;
    height: 76px;
  }

  .step-emoji {
    font-size: 34px;
  }

  .step-icon-img {
    width: 44px;
    height: 44px;
  }

  .text-input {
    height: 46px;
    font-size: 14px;
  }

  .btn-prev,
  .btn-next,
  .btn-verify,
  .btn-ai-start,
  .s5-btn-outline,
  .s5-btn-primary {
    height: 44px;
    font-size: 13px;
  }

  .s5-stat-value {
    font-size: 24px;
  }

  .s5-stat.orange .s5-stat-value {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .modal-wrap {
    padding: 12px;
  }

  .modal2 {
    width: 100%;
    max-width: 100%;
    max-height: calc(70vh - 24px);
    border-radius: 20px;
  }

  .modal-header {
    padding: 16px 16px 12px;
  }

  .step-panel {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
  }

  .step-bubble {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .step-label {
    font-size: 10px;
  }

  .step-connector {
    min-width: 10px;
    max-width: 20px;
  }

  .step-title,
  .ai-title,
  .s5-title {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .step-desc,
  .ai-sub,
  .verify-hint,
  .footer-hint {
    font-size: 12px;
  }

  .step-emoji-wrap {
    width: 68px;
    height: 68px;
    margin-bottom: 12px;
  }

  .step-emoji {
    font-size: 30px;
  }

  .step-icon-img {
    width: 40px;
    height: 40px;
  }

  .industry-card,
  .rank-card,
  .check-item,
  .ai-result-card,
  .kw-card,
  .s5-stat {
    border-radius: 12px;
  }

  .industry-card,
  .rank-card,
  .check-item,
  .ai-result-card,
  .kw-card {
    padding: 12px;
  }

  .text-input {
    height: 44px;
    font-size: 14px;
    padding-left: 12px;
    padding-right: 40px;
  }

  .field-label,
  .rank-label,
  .kw-keyword,
  .check-value,
  .ari-value {
    font-size: 13px;
  }

  .ic-name,
  .rank-desc,
  .check-sub,
  .field-hint,
  .kw-header-sub,
  .s5-stat-sub,
  .s5-row-sub {
    font-size: 11px;
  }

  .btn-prev,
  .btn-next,
  .btn-verify,
  .btn-ai-start,
  .s5-btn-outline,
  .s5-btn-primary {
    height: 42px;
    font-size: 12px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .close-btn {
    width: 30px;
    height: 30px;
  }

  .s5-stat {
    padding: 12px 8px;
  }

  .s5-stat-value {
    font-size: 22px;
  }

  .s5-stat.orange .s5-stat-value {
    font-size: 18px;
  }

  .s5-cost-banner {
    padding: 11px 14px;
    font-size: 12px;
  }

  .s5-cost-banner strong {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .modal-wrap {
    padding: 8px;
  }

  .modal2 {
    max-height: calc(69vh - 16px);
    border-radius: 16px;
  }

  .modal-header {
    padding: 14px 14px 10px;
  }

  .step-panel {
    padding: 14px;
  }

  .modal-footer {
    padding: 10px 14px;
  }

  .step-bubble {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .step-label {
    font-size: 9px;
  }

  .step-title,
  .ai-title,
  .s5-title {
    font-size: 17px;
  }

  .step-desc,
  .ai-sub {
    font-size: 11.5px;
    line-height: 1.55;
  }

  .step-emoji-wrap {
    width: 60px;
    height: 60px;
  }

  .step-emoji {
    font-size: 26px;
  }

  .step-icon-img {
    width: 36px;
    height: 36px;
  }

  .text-input {
    height: 42px;
    font-size: 13px;
  }

  .field-label,
  .check-value,
  .kw-keyword,
  .ari-value,
  .s5-row-name {
    font-size: 12px;
  }

  .btn-prev,
  .btn-next,
  .btn-verify,
  .btn-ai-start,
  .s5-btn-outline,
  .s5-btn-primary {
    height: 40px;
    font-size: 11.5px;
  }

  .footer-hint,
  .verify-hint,
  .kw-pill,
  .tag,
  .s5-badge,
  .check-badge {
    font-size: 10px;
  }

  .toast {
    bottom: 14px;
    font-size: 12px;
    padding: 9px 16px;
  }
}

@media (max-width: 385px) {
  .modal-wrap {
    padding: 8px;
  }

  .modal2 {
    max-height: calc(74vh - 16px);
    border-radius: 16px;
  }
}

/* 체크 아이콘 기본 숨김 */
.s5-row-check i{
    font-size:10px;
    color:#fff;
    display:none;
}

.s5-checkbox{
    display:none;
}
/* 체크 되었을 때 스타일 */
.s5-checkbox:checked + .s5-row-check{
    background:#4f46e5; /* 체크 배경색 */
    border-color:#4f46e5;
}


/* 체크 되었을 때 아이콘 보이기 */
.s5-checkbox:checked + .s5-row-check i{
    display:block;
}

.s5-table-row.disabled{
    opacity:0.5;
    pointer-events:none;
    animation: none;
}

  .review-form-wrap {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    grid-column: 1 / -1;
    /*border: 1px solid #eceef3;
    border-radius: 20px;*/
    padding: 4px 4px;
    /*box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);*/
  }

  .review-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
  }

  .review-form-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #1f2937;
  }

  .review-form-desc {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: #7a8699;
  }

  .required-badge-box {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f7f8fc;
    border: 1px solid #e7ebf2;
    color: #8390a3;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
  }

  .review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 18px;
  }

  .review-grid .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }

  .form-field.full {
    grid-column: 1 / -1;
  }

  .field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
  }

  .required-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ffe8ea;
    color: #eb5b67;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
  }

  .sub-text {
    font-size: 12px;
    font-weight: 600;
    color: #9aa4b2;
  }

  .sub-text.red {
    color: #ef6b6b;
  }

  .review-grid .input,
  .review-grid .select,
  .review-grid .textarea {
    width: 100%;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    background: #fff;
    padding: 4px 8px;
    font-size: 13px;
    color: #222;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .review-grid .input,
  .review-grid .select {
    height: 36px;
  }

  .review-grid .textarea {
    min-height: 110px;
    resize: vertical;
  }

  .input::placeholder,
  .textarea::placeholder {
    color: #c2c9d4;
  }

  .input:focus,
  .select:focus,
  .textarea:focus {
    border-color: #9cbcff;
    box-shadow: 0 0 0 4px rgba(73, 131, 255, 0.08);
  }

  .upload-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .upload-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  .upload-box {
    width: 108px;
    height: 108px;
    border: 1px solid #d8dee8;
    border-radius: 16px;
    background: #f6f7fb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
  }

  .upload-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  }

  .upload-box.main {
    background: linear-gradient(180deg, #e7f6ff 0%, #d8edff 100%);
    border-color: #b9daf8;
  }

  .upload-icon {
    font-size: 22px;
    line-height: 1;
  }

  .upload-text {
    font-size: 13px;
    font-weight: 700;
    color: #7a8699;
    text-align: center;
  }

  .hidden-file {
    display: none;
  }

  .agree-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
    margin-top: 4px;
  }

  .agree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 28px;
    font-size: 12px;
    font-weight: 700;
    color: #444;
  }

  .agree-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6d8cff;
    cursor: pointer;
  }

  .mini-btn {
    border: 0;
    background: #f2f4f7;
    color: #666;
    border-radius: 999px;
    padding: 2px 4px;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
  }

  @media (max-width: 900px) {
    .review-grid {
      grid-template-columns: 1fr 1fr;
    }

    .agree-grid {
      grid-template-columns: 1fr;
    }

    .review-form-header {
      flex-direction: column;
      align-items: flex-start;
    }

    .required-badge-box {
      align-self: flex-start;
    }
  }

  @media (max-width: 640px) {
    body {
      padding: 14px;
    }

    .review-form-wrap {
      padding: 18px 14px;
      border-radius: 16px;
    }

    .review-form-title {
      font-size: 14px;
    }

    .review-form-desc {
      font-size: 13px;
    }

    .field-label {
      font-size: 12px;
    }

    .input,
    .select,
    .textarea {
      font-size: 14px;
      padding: 12px 14px;
    }

    .input,
    .select {
      height: 48px;
    }

    .textarea {
      min-height: 130px;
    }

    .upload-grid {
      gap: 10px;
    }

    .upload-box {
      width: calc(33.333% - 7px);
      min-width: 88px;
      height: 96px;
      border-radius: 14px;
    }
  }

  .s5-info-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 7px;
  border-radius:999px;
  background:#fff3f3;
  color:#e95a5a;
  border:1px solid #ffd2d2;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
  user-select:none;
}

.s5-info-tag.active{
  background:#eaf8ee;
  color:#1e9b57;
  border-color:#bde7c9;
}

#infoFormBox_1, #infoFormBox_2{
  display:none;
  margin-top:14px;
}

#infoFormBox_1.open, #infoFormBox_2.open{
  display:block;
}


.review-form-wrap{
  border-bottom:1px solid var(--gray-100);
}

#scheduleFormBox .date-box{
  position:relative;
  display:flex;
  align-items:center;
}

#scheduleFormBox .date-box .input{
  padding-right:52px;
}

#scheduleFormBox .date-button{
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
}

#scheduleFormBox .personnel-box{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

#scheduleFormBox .personnel-box .input{
  width: 35%;
  min-width:60px;
}

#scheduleFormBox .box-text{
  font-size:14px;
  font-weight:700;
  color:#444;
}

#scheduleFormBox .info-panel{
  border:1px solid #ffe0e0;
  background:#fff8f8;
  border-radius:14px;
  padding:14px 16px;
}

#scheduleFormBox .info-panel-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}

#scheduleFormBox .info-panel-body{
  display:flex;
  flex-direction:column;
  gap:6px;
}

#scheduleFormBox .sub-text.red{
  color:#e54848;
  font-weight:600;
}

@media (max-width: 640px){
  #scheduleFormBox .personnel-box{
    gap:8px;
  }

  #scheduleFormBox .personnel-box .input{
    width:30%;
    min-width:unset;
  }
}


@media (max-width: 460px){

  #scheduleFormBox .personnel-box .input{
    width:21%;
    min-width:unset;
  }
}

#scheduleFormBox{
    grid-column: 1 / -1;
}

.review-form-wrap{
  max-height:0;
  overflow:hidden;
  opacity:0;
  transition:max-height .35s ease, opacity .25s ease, margin-top .25s ease;
  margin-top:0;
}

.review-form-wrap.open{
  max-height:3000px;
  opacity:1;
  margin-top:14px;
}

.s5-info-tag.completed{
  color:#2563eb;
  font-weight:700;
}



/* 클릭했을 때 */
.input-box.payment-amount input:focus{
    border-color:#C7D2FE;
    box-shadow:0 0 0 3px rgba(42,63,216,0.08);
}


.payment-amount{
    display:flex;
    align-items:center;
    gap:10px;
}

/* 제목 */
.payment-amount .box-title{
    font-size:14px;
    font-weight:600;
    color:#111827;
    white-space:nowrap;
}

/* input + 원 묶음 */
.input-box.payment-amount{
    position:relative;
    display:flex;
    align-items:center;
}

/* input */
.input-box.payment-amount input{
    width:100px;

    height:36px;                /* 높이 줄임 */
    padding:0 10px 0 12px;

    font-size:15px;
    font-weight:600;

    text-align:right;
    color:#2A3FD8;

    border:1px solid #E5E7EB;
    border-radius:10px;

    background:#fff;
    outline:none;
    height: 30px;
}

/* 원 텍스트 */
.input-box.payment-amount .box-text{
    position:absolute;
    left:204px;

    font-size:13px;
    color:#6B7280;
    font-weight:500;
}

#keyword-container_1,
#hashtag-container_1{
    width:100%;
}

#keyword-container_1{
    grid-column:1 / 2;
}

#hashtag-container_1{
    grid-column:2 / 3;
}


/* 태그들을 감싸는 영역 */
#hashtag-container_1,
#keyword-container_1{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    flex-direction: row;
}

/* input 은 한 줄 전체 차지 
#hashtag-container_1 input,
#keyword-container_1 input{
    flex:1 1 100%;
    order:-1;
}
*/

/* 태그 스타일 */
.hashtag,
.keyword{
    display: inline-flex;
    align-items: center;
    background-color: #f0efff;
    border: 1px solid #6759ff;
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #4f46e5;
    white-space: nowrap;
    height: 22px;
}

/* x 버튼 */
.remove-hashtag,
.remove-keyword{
    margin-left:6px;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    opacity:.6;
}

.remove-hashtag:hover,
.remove-keyword:hover{
    opacity:1;
}

.s5-info-tag{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    /* min-height: 34px; */
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: all .2s ease;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.s5-info-tag .tag-dot{
    font-size:12px;
    line-height:1;
}

.s5-info-tag .tag-arrow{
    width:0;
    height:0;
    border-left:5px solid transparent;
    border-right:5px solid transparent;
    transition:transform .2s ease;
}

.s5-info-tag.is-required{
    background:#F3E9C8;
    color:#7A6512;
    border-color:#E2D29A;
}

.s5-info-tag.is-required .tag-arrow{
    border-top:9px solid #9A7C12;
}

.s5-info-tag.is-editing{
    background:#E5E5E5;
    color:#8B8B8B;
    border-color:#D6D6D6;
}

.s5-info-tag.is-editing .tag-arrow{
    border-bottom:9px solid #A7A7A7;
}

.s5-info-tag.is-complete{
    background:#DDF7E8;
    color:#25B85A;
    border-color:#1FA2FF;
    box-shadow:0 0 0 2px rgba(31,162,255,.12) inset;
}

.s5-info-tag.is-complete .tag-arrow{
    border-bottom:9px solid #25B85A;
}