:root {
  --bg-page: #f4f7fb;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --rose: #e11d48;
  --rose-soft: #fff1f2;
  --amber: #d97706;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Malgun Gothic", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  /* ★ 한국어 어절 단위 줄바꿈(가독성 표준) + 긴 괄호/URL/수식 화면 뚫림 방지(anywhere) + 숫자 폭 고정(tnum) */
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* 상단 고정 클린 헤더 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
}

.brand-area,
.brand-area:focus,
.brand-area:focus-visible,
.brand-area:active,
.brand-area * {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.brand-name {
  font-size: 18.5px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.ver-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  font-size: 11.5px;
  font-weight: 800;
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #2563eb;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.10);
}

.brand-desc {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

/* 3단계 스텝 바 */
.step-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.18s;
}

.step-pill .s-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.step-pill.active .s-num {
  background: #fff;
  color: var(--primary);
}

.step-line {
  width: 22px;
  height: 2px;
  background: var(--border-strong);
}

.header-actions {
  order: -1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-bottom: 5px;
  margin-bottom: 2px;
  border-bottom: 1px dashed var(--border);
}

.header-actions .btn-ghost,
.header-actions .btn-toss-mode {
  padding: 4px 10px;
  font-size: 11.5px;
}

.status-dot {
  font-size: 11px;
  background: var(--emerald-soft);
  color: var(--emerald);
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 700;
}

/* 공통 버튼 */
.btn-primary, .btn-secondary, .btn-ghost {
  cursor: pointer;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 16px;
  border: none;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-ghost {
  background: var(--bg-subtle);
  color: var(--text-sub);
  border: 1px solid var(--border);
  font-size: 12.5px;
  padding: 7px 12px;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 13px 26px;
  font-size: 15.5px;
  border-radius: 12px;
}

.small {
  padding: 5px 10px;
  font-size: 12px;
}

/* 메인 위저드 컨테이너 */
.wizard-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.wizard-step {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.22s ease;
}

.wizard-step.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 스텝 히어로 타이틀 */
.step-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4px;
}

.step-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.step-hero h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.step-hero p {
  font-size: 14.5px;
  color: var(--text-sub);
}

/* 클린 화이트 카드 (외곽선 대비 및 영역 분리감 강화) */
.clean-card {
  background: var(--bg-card);
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

/* 🐶 STEP 1 - ① 세이포 담당 (초록 테마: 구조견 안전조끼·말풍선과 1:1 매칭) */
.search-box-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px solid #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.09);
}

/* 🦊 STEP 1 - ② 로폭스 담당 (파란 테마: 해결사 201 도표집·말풍선과 1:1 매칭) */
.detected-chart-card {
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
  border: 2px solid #3b82f6;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.09);
}

.section-label {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.sub-help {
  font-size: 13px;
  color: var(--text-muted);
}

.card-head-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.clean-select {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* 1-A. 일상어 검색 바 */
.nl-search-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.nl-search-row input {
  flex: 1;
  background: #fff;
  border: 2px solid #34d399;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  color: var(--text-main);
  outline: none;
}

.nl-search-row input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16);
}

#btnNlSearch {
  background: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

#btnNlSearch:hover {
  background: #047857;
}

.nl-example-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ex-chip {
  background: #ffffff;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ex-chip:hover {
  border-color: #10b981;
  color: #047857;
  background: #ecfdf5;
}

.ex-chip.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #047857;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.28);
}

.ex-chip.active::before {
  content: "✔ ";
  font-weight: 900;
}

/* 1-B. 대표 사고 시각 일러스트 카드 3종 */
.scenario-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .scenario-cards-grid {
    grid-template-columns: 1fr;
  }
}

.scenario-visual-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 13px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.scenario-visual-card:hover {
  border-color: #93c5fd;
  background: #fff;
  transform: translateY(-2px);
}

.scenario-visual-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}

.sv-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: #fff;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 99px;
}

.sv-illust svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.scenario-visual-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.scenario-visual-card p {
  font-size: 12.5px;
  color: var(--text-sub);
}

/* 1-C. 드롭존 & 몽타주 프리뷰 */
.token-save-pill {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
}

.upload-drop-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .upload-drop-grid {
    grid-template-columns: 1fr;
  }
}

.dropzone-box {
  border: 2px dashed #10b981;
  background: #ecfdf5;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.dropzone-box:hover {
  border-color: #059669;
  background: #d1fae5;
}

.dropzone-box.secondary {
  border: 2px dashed #64748b;
  background: #f8fafc;
}

.dropzone-box.secondary:hover {
  border-color: #334155;
  background: #f1f5f9;
}

.dz-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.dz-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.dz-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.montage-preview-wrap {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.mp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  flex-wrap: wrap;
}

.montage-preview-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.step-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
}

/* STEP 2: 3대 물리 질문 카드 */
.question-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 920px) {
  .question-cards-grid {
    grid-template-columns: 1fr;
  }
}

.q-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.q-card.role-my {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border: 1.5px solid #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
}

.q-card.role-other {
  background: linear-gradient(180deg, #fff1f2 0%, #fff8f9 100%);
  border: 1.5px solid #fda4af;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.06);
}

.q-head-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.q-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
}

.q-role-pill.my {
  background: #2563eb;
  color: #ffffff;
}

.q-role-pill.other {
  background: #e11d48;
  color: #ffffff;
}

.q-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.quick-choice-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q-chip {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.q-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.q-chip.active {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.14);
}

.q-card.role-other .q-chip:hover {
  border-color: #e11d48;
  color: #be123c;
}

.q-card.role-other .q-chip.active {
  background: #ffe4e6;
  color: #9f1239;
  border-color: #e11d48;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.14);
}

.q-sub-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 6px 10px;
}

.q-sub-input input {
  width: 58px;
  padding: 3px 6px;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  background: #ffffff;
}

/* STEP 2: 스마트 한국형 약도 */
.road-tpl-bar, .smart-element-toggles {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.bar-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  margin-right: 4px;
}

.tool-chip {
  background: var(--bg-subtle);
  color: var(--text-sub);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.tool-chip.active {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}

.el-toggle {
  background: #fff;
  color: var(--text-sub);
  border: 1.5px solid var(--border-strong);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.el-toggle:hover {
  border-color: var(--emerald);
}

.el-toggle.active {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: var(--emerald);
}

.sketch-stage-grid {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 14px;
  align-items: start;
}

@media (max-width: 920px) {
  .sketch-stage-grid {
    grid-template-columns: 1fr;
  }
}

.canvas-box {
  background: #f8fafc;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

#accidentSketchCanvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

.sketch-side-controls {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.side-box-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.draw-mode-vertical {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.draw-btn {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.draw-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

.active-el-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

/* 가감산 및 폼 */
.info-banner {
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin: 10px 0 12px;
}

.modifiers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 800px) {
  .modifiers-grid {
    grid-template-columns: 1fr;
  }
}

.mod-group-card {
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-group-card.favorable {
  background: linear-gradient(180deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1.5px solid #86efac;
}

.mod-group-card.unfavorable {
  background: linear-gradient(180deg, #fffbeb 0%, #f8fafc 100%);
  border: 1.5px solid #fcd34d;
}

.mod-group-head {
  font-size: 13.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 4px;
}

.mod-group-card.favorable .mod-group-head {
  color: #065f46;
}

.mod-group-card.unfavorable .mod-group-head {
  color: #92400e;
}

.mod-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mod-item:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.mod-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.mod-item-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.mod-item-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mod-badge {
  margin-left: 0;
  font-size: 11.5px;
  font-weight: 900;
  padding: 2.5px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

.mod-meaning-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
}

.mod-item-line2 {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  word-break: keep-all;
}

.mod-plus {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid #86efac;
}

.mod-minus {
  background: var(--rose-soft);
  color: var(--rose);
  border: 1px solid #fda4af;
}

.my-case-meta-box {
  background: #f8fafc;
  border: 1.5px solid #93c5fd;
  border-radius: 12px;
  padding: 12px 14px;
}

.mcm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
}

.mcm-badge {
  background: #eff6ff;
  border: 1px solid #60a5fa;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.mcm-sub {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.claims-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.datetime-weather-row {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: 6px;
}

.injury-meta-row {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 6px;
  align-items: stretch;
}

.per-person-injury-panel {
  margin-top: 8px;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  padding: 9px 11px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.pp-header {
  font-size: 11.5px;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 7px;
}

.pp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
}

.pp-grid.single-col {
  grid-template-columns: 1fr;
}

.pp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 8px;
}

.pp-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.pp-select {
  flex: 1;
  min-width: 0;
  padding: 5px 7px !important;
  font-size: 12px !important;
}

.claims-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.claim-auto-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 104px;
  line-height: 1.58;
  font-size: 13.5px !important;
  padding: 10px 13px !important;
  overflow-y: hidden;
  resize: vertical;
  word-break: keep-all;
}

.gross-party-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gpb-top-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.gpb-title {
  font-size: 12px;
  font-weight: 800;
  color: #1e40af;
  white-space: nowrap;
}

.gpb-party-pills {
  display: grid;
  grid-template-columns: 0.72fr 1.14fr 1.14fr;
  gap: 8px;
}

.gpb-pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.gpb-pill.active[data-gross-party="none"] {
  background: #f1f5f9;
  border-color: #64748b;
  color: #0f172a;
}

.gpb-pill.gpb-opponent.active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.gpb-pill.gpb-mycar.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.gpb-reason-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
}

.gpb-owner-badge {
  font-size: 11.5px;
  font-weight: 900;
  color: #b91c1c;
  white-space: nowrap;
}

.gpb-reason-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.gpb-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
}

.gpb-chip.active {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

@media (max-width: 850px) {
  .claims-compact-grid, .claims-text-grid, .datetime-weather-row, .injury-meta-row {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
}

.form-field input, .form-field select, .form-field textarea {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
}

.gross-check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rose);
  cursor: pointer;
}

/* ========================================================================== */
/* STEP 3: 원페이지 프리미엄 교통사고 법률 감정서 */
/* ========================================================================== */
.report-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.report-top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  border: 2px solid #93c5fd;
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.rh-top-badge {
  display: inline-block;
  background: #1e3a8a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.rh-headline {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--text-main);
}

.highlight-money {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rh-sub {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 4px;
  margin-bottom: 20px;
}

.verdict-compare-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1.25fr;
  gap: 12px;
  align-items: center;
}

@media (max-width: 860px) {
  .verdict-compare-grid {
    grid-template-columns: 1fr;
  }
  .verdict-arrow {
    display: none;
  }
}

.verdict-box {
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px;
}

.verdict-box.ai-winner {
  border: 2.5px solid var(--emerald);
  background: #f8fffb;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.1);
}

.vb-label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-sub);
}

.vb-ratio {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 0 10px;
}

.vb-ratio.strong {
  font-size: 24px;
  color: var(--emerald);
}

.verdict-arrow {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  text-align: center;
}

.gauge-track {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
}

.gauge-track.large {
  height: 34px;
}

.g-fill-a {
  background: #3b82f6;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.g-fill-b {
  background: #ef4444;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}

.vb-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.vb-note.strong {
  color: #065f46;
  font-weight: 700;
}

.verdict-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.applied-chip {
  background: #fff;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

.card-sec-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
}

.evidence-two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

@media (max-width: 880px) {
  .evidence-two-col {
    grid-template-columns: 1fr;
  }
}

.ev-sub-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.ev-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  display: block;
}

.zoomable-forensic-img {
  cursor: zoom-in;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.zoomable-forensic-img:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.14);
}

.ev-zoom-hint-bar {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #1d4ed8;
  text-align: center;
  cursor: zoom-in;
  transition: background 0.15s ease;
}

.ev-zoom-hint-bar:hover {
  background: #eff6ff;
}

.report-timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 880px) {
  .report-timeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.timeline-item {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-left: 5px solid var(--primary);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.timeline-item.risk-high {
  border-left-color: var(--amber);
  background: #fffdf5;
}

.timeline-item.risk-critical {
  border-left-color: var(--rose);
  background: #fff5f5;
}

.timeline-item .t-head {
  font-weight: 900;
  font-size: 13.5px;
  color: #0f172a;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #cbd5e1;
}

.timeline-item .t-party-block {
  margin-top: 5px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.timeline-item .tp-title {
  font-size: 12.5px;
  font-weight: 900;
}

.timeline-item .t-party-a .tp-title {
  color: #1d4ed8;
}

.timeline-item .t-party-b .tp-title {
  color: #b91c1c;
}

.timeline-item .tp-desc {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  padding-left: 18px;
  text-indent: -11px;
  margin-top: 1px;
}

/* 판례 & ROI */
.precedents-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.precedent-card {
  background: var(--bg-subtle);
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 15px 18px;
}

.precedent-card .p-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.precedent-card .p-no {
  font-weight: 800;
  color: var(--primary);
  font-size: 14px;
}

.precedent-card .p-cat {
  font-size: 11.5px;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--text-sub);
  padding: 2px 9px;
  border-radius: 99px;
}

.precedent-card .p-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 6px;
}

.precedent-card .p-holding {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.precedent-card .p-key {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--emerald);
}

.kpi-4-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.strategies-3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 880px) {
  .kpi-4-grid, .strategies-3-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.kpi-box .k-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.kpi-box .k-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 4px;
}

.kpi-box.highlight {
  background: var(--emerald-soft);
  border-color: #a7f3d0;
}

.kpi-box.highlight .k-val {
  color: var(--emerald);
}

.strategy-card {
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  height: 100%;
}

.strategy-card .s-head-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

@media (min-width: 881px) {
  .strategy-card .s-head-block {
    min-height: 74px;
  }
}

.strategy-card .s-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.42;
  word-break: keep-all;
}

.strategy-card .s-suit {
  display: inline-block;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  margin-top: 2px;
}

.strategy-card .s-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: 8px;
}

/* 테이블 & 진술서 에디터 */
.table-wrap {
  overflow-x: auto;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.clean-table th, .clean-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.clean-table th {
  background: var(--bg-subtle);
  font-weight: 800;
  color: var(--text-main);
}

.clean-statement-editor {
  width: 100%;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 18px 22px;
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.72;
  letter-spacing: -0.015em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  margin-top: 12px;
}

/* 모달 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}

.modal-window {
  background: #fff;
  border-radius: 18px;
  max-width: 520px;
  width: 100%;
  padding: 22px;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-window.wide {
  max-width: 960px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.cost-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-subtle);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.inline-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.inline-ctrl input[type="number"] {
  width: 68px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

/* ========================================================================== */
/* 토스 미니앱(Apps in Toss) 뷰어 프레임 & 수익모델(Paywall · 카톡공유 · B2B 제휴) */
/* ========================================================================== */
.btn-toss-mode {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s;
}

.btn-toss-mode.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

/* 모바일 미니앱 시뮬레이션 모드 활성화 시 */
body.toss-miniapp-mode {
  background: #1e293b;
}

body.toss-miniapp-mode .wizard-container {
  max-width: 460px;
  background: var(--bg-page);
  min-height: calc(100vh - 70px);
  margin: 14px auto 40px;
  border-radius: 32px;
  border: 8px solid #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 20px 14px 40px;
}

body.toss-miniapp-mode .scenario-cards-grid,
body.toss-miniapp-mode .upload-drop-grid,
body.toss-miniapp-mode .question-cards-grid,
body.toss-miniapp-mode .sketch-stage-grid,
body.toss-miniapp-mode .modifiers-grid,
body.toss-miniapp-mode .claims-compact-grid,
body.toss-miniapp-mode .claims-text-grid,
body.toss-miniapp-mode .verdict-compare-grid,
body.toss-miniapp-mode .evidence-two-col,
body.toss-miniapp-mode .report-timeline-grid,
body.toss-miniapp-mode .kpi-4-grid,
body.toss-miniapp-mode .strategies-3-grid {
  grid-template-columns: 1fr !important;
}

body.toss-miniapp-mode .verdict-arrow {
  display: none;
}

.btn-kakao {
  background: #fee500;
  color: #191919;
  border: 1px solid #eab308;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.btn-kakao:hover {
  background: #facc15;
}

/* 사고링크/로톡형 B2B 전문가 매칭 제휴 배너 */
.partner-match-banner {
  margin-top: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pm-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  background: #1d4ed8;
  color: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.partner-match-banner h4 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.partner-match-banner p {
  font-size: 12.5px;
  color: #475569;
  margin-top: 2px;
}

/* 토스페이 4,900원 진술서 잠금해제 오버레이 */
.statement-paywall-wrap {
  position: relative;
  margin-top: 12px;
}

.clean-statement-editor.blurred-locked {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.paywall-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.96) 45%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 12px;
}

.paywall-card {
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 18px;
  padding: 24px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.16);
}

.pw-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.paywall-card h4 {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}

.paywall-card p {
  font-size: 13px;
  color: #475569;
  margin-bottom: 14px;
}

.pw-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.old-price {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
}

.now-price {
  font-size: 24px;
  font-weight: 900;
  color: #2563eb;
}

.unit-cost-note {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
}

.btn-toss-pay {
  width: 100%;
  background: linear-gradient(135deg, #0064ff 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 100, 255, 0.3);
}

.btn-toss-pay:hover {
  transform: translateY(-1px);
}

/* 4열 고정 균등 시나리오 그리드 (어중간한 5+2 줄바꿈 완전 방지) */
.scenario-cards-grid.four-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.scenario-cards-grid.three-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .scenario-cards-grid.four-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .scenario-cards-grid.four-cols,
  .scenario-cards-grid.three-cols {
    grid-template-columns: 1fr;
  }
}

/* 모든 버튼·칩·배지 1줄 칼정렬 강제 (글자가 한 줄/두 줄로 깨지는 현상 원천 차단) */
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-toss-mode,
.btn-kakao,
.step-pill,
.ex-chip,
.sv-badge,
.token-save-pill,
.tool-chip,
.el-toggle,
.draw-btn,
.mod-badge,
.uc-tag,
.uc-matched-chart,
.uc-kw-chip,
.applied-chip {
  white-space: nowrap;
}

.q-chip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.scenario-visual-card {
  height: 100%;
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.scenario-visual-card .sv-badge {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  padding: 2px 8px;
}

.scenario-visual-card .sv-illust {
  position: relative;
}

.scenario-visual-card h4 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  margin-top: 2px;
}

.scenario-visual-card p {
  font-size: 12px;
  line-height: 1.42;
  min-height: 34px;
  word-break: keep-all;
}

.sv-badge.badge-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.sv-badge.badge-warn {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.chip-prefix {
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

/* 몽타주 헤더 컨트롤 1줄 정렬 */
.mp-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.mp-ctrl-label {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
}

.mp-input {
  width: 68px;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 6px;
  text-align: center;
}

.mp-btn {
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #0284c7;
  background: #0284c7;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.mp-btn.secondary {
  border-color: #475569;
  background: #1e293b;
  color: #cbd5e1;
}

/* 깔끔한 접기/펴기 아코디언 (복잡한 고급 설정 숨김용) */
.clean-accordion {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.clean-accordion > summary {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}

.clean-accordion > summary::-webkit-details-marker {
  display: none;
}

.clean-accordion > summary::after {
  content: "▼ 펼치기";
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  background: #fff;
  border: 1px solid #bfdbfe;
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

.clean-accordion[open] > summary::after {
  content: "▲ 접기";
}

.clean-accordion > summary:hover {
  background: #eef2ff;
  color: var(--primary);
}

.clean-accordion.dark-accordion {
  background: #0f172a;
  border-color: #334155;
}

.clean-accordion.dark-accordion > summary {
  color: #93c5fd;
}

.clean-accordion.dark-accordion > summary:hover {
  background: #1e293b;
}

.aihub-panel-body {
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border-top: 1px solid #334155;
}

.aihub-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.aihub-pill {
  display: inline-block;
  background: #0284c7;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.aihub-bench-badge {
  font-size: 12px;
  background: #065f46;
  color: #a7f3d0;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

/* Step 2 상단: 내가 입력한 사고 상황 & AI 자동 매칭 배너 */
.user-context-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 2px solid #60a5fa;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.uc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.uc-top .btn-ghost {
  flex-shrink: 0;
  white-space: nowrap;
}

.uc-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
}

.uc-tag {
  background: #1d4ed8;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  flex-shrink: 0;
  white-space: nowrap;
}

.uc-matched-chart {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
  font-size: 12.5px;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 99px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uc-quote-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 8px 14px;
}

.uc-quote-icon {
  font-size: 22px;
  font-weight: 900;
  color: #2563eb;
  line-height: 1;
}

.uc-editable-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
}

.uc-Extracted-tags {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.uc-kw-chip {
  font-size: 11.5px;
  font-weight: 700;
  background: #ffffff;
  color: #1e40af;
  border: 1px solid #93c5fd;
  padding: 2px 9px;
  border-radius: 99px;
}

/* ★ 1페이지(#step1AutoPrefillSummary) · 2페이지(#step2ExtractedKeywords) 공통:
   [1줄: 기본형 기준] / [2줄: 과실 가감 요인] 2단 분리 + 앞머리 의미 배지 레이아웃 */
.situation-2row-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.s2r-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-radius: 9px;
}

.s2r-line.base-line {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}

.s2r-line.mod-line {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
}

.s2r-line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 900;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.s2r-line-badge:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.s2r-line-badge.base {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.s2r-line-badge.mod {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.s2r-chips-list {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.s2r-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 10px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.s2r-chip .s2r-meaning {
  margin-right: 4px;
}

.s2r-chip.base {
  background: #ffffff;
  border: 1px solid #6ee7b7;
  color: #064e3b;
}

.s2r-chip.base .s2r-meaning {
  color: #047857;
  font-weight: 900;
}

.s2r-chip.fav {
  background: #ffffff;
  border: 1.5px solid #60a5fa;
  color: #1e3a8a;
}

.s2r-chip.fav .s2r-meaning {
  color: #1d4ed8;
  font-weight: 900;
}

.s2r-chip.shield {
  background: #ffffff;
  border: 1.5px solid #60a5fa;
  color: #1e3a8a;
}

.s2r-chip.shield .s2r-meaning {
  color: #1d4ed8;
  font-weight: 900;
}

.s2r-chip.unfav {
  background: #fff1f2;
  border: 1.5px solid #fda4af;
  color: #881337;
}

.s2r-chip.unfav .s2r-meaning {
  color: #be123c;
  font-weight: 900;
}

.s2r-chip.hint {
  background: #ffffff;
  border: 1px dashed #3b82f6;
  color: #1e3a8a;
}

.s2r-chip.hint .s2r-meaning {
  color: #1d4ed8;
  font-weight: 900;
}

.s2r-edit-hint {
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  white-space: nowrap;
  margin-left: auto;
}

/* Step 3 상단: 의뢰인 접수 상황 에코 박스 */
.report-user-echo-box {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13.5px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.rue-label {
  font-weight: 800;
  color: #1d4ed8;
  white-space: nowrap;
}

.rue-text {
  font-weight: 700;
  color: #0f172a;
}

/* ========================================================================== */
/* ★ 토스(Toss) 미니앱 전용 스마트폰 상단 바 & 실시간 토스뷰 요약 카드 */
/* ========================================================================== */
.toss-miniapp-chrome {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  margin: -20px -14px 16px;
  padding: 10px 16px 12px;
  border-radius: 24px 24px 0 0;
}

body.toss-miniapp-mode .toss-miniapp-chrome {
  display: block;
}

.tm-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.tm-notch {
  width: 76px;
  height: 16px;
  background: #0f172a;
  border-radius: 99px;
}

.tm-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-back,
.tm-close {
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}

.tm-title {
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

/* 어느 단계에서나 상단에 결론과 실익을 한눈에 보여주는 토스/사고링크형 카드 (좌측 대형 실사 AI 영상 + 우측 과실방어 리포트 2열 황금비율 구조)
   ★ Impeccable (Persuade Hero Surface + Colorize): 가장 큰 바깥 박스 자체가 'AI 포렌식 시연·소개 존'임을 한눈에 알 수 있도록
      선명한 스카이블루~민트 컬러 그라데이션(#dbeafe ➔ #e0f2fe ➔ #d1fae5) 위에 은은한 24px 포렌식 계측 모눈(Grid) 무늬와
      소프트 스포트라이트 패턴을 입히고, 좌측 영상 컬럼의 중첩 박스(Nested Card)는 제거하여 단일 쇼케이스 박스로 통일 */
.toss-live-summary-card {
  background-color: #0f172a;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(14, 165, 233, 0.18) 0%, transparent 46%),
    radial-gradient(circle at 88% 84%, rgba(16, 185, 129, 0.15) 0%, transparent 46%),
    linear-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
  background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  border: 2px solid #0ea5e9;
  border-radius: 22px;
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(125, 211, 252, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.tls-top-grid {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  transition: all 0.25s ease;
}

.tls-top-grid.expanded-layout {
  grid-template-columns: 1fr;
}

/* ★ 상단 요약 카드 내 대형 실사 블랙박스 AI 비전 스캔 영상 컬럼 (중첩 카드 없이 바깥 쇼케이스 배경 위에 직접 배치) */
.tls-video-preview-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tls-video-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
}

.tls-video-preview-wrap.expanded {
  max-width: 100%;
  width: 100%;
  margin: 0;
}

.tls-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  padding: 5px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid #0284c7;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.20), inset 0 0 0 1px rgba(56, 189, 248, 0.25);
  cursor: pointer;
}

.tls-hero-video-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 11px;
  overflow: hidden;
  background: #0f172a;
}

.tls-video-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  padding: 6px 12px;
}

.tls-video-legend-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
  padding-left: 2px;
  overflow: visible;
}

.tls-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.tls-leg-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.tls-leg-dot.blue {
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.tls-leg-dot.rose {
  background: #e11d48;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

.tls-leg-dot.gray {
  background: #94a3b8;
  border: 1.5px solid #64748b;
}

.tls-leg-item.blue {
  color: #2563eb;
}

.tls-leg-item.rose {
  color: #e11d48;
}

.tls-leg-item.gray {
  color: #475569;
}

.tls-leg-sep {
  color: #cbd5e1;
  font-size: 11px;
  white-space: nowrap;
}

.tls-video-mode-tabs {
  display: flex;
  gap: 6px;
  flex: 1;
}

.tls-v-tab {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tls-v-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tls-v-tab.active {
  background: #0f172a;
  border-color: #0284c7;
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.22);
}

.tls-v-expand-btn {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tls-v-expand-btn:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

/* ★ 우측 내 예상 손해배상 · 과실 방어 리포트 컬럼 */
.tls-report-right-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.tls-headline-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tls-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tls-eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(30, 41, 59, 0.95);
  border: 1.5px solid #38bdf8;
  padding: 3px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
}

.tls-headline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .tls-headline-row {
    flex-wrap: wrap;
  }
}

body.toss-miniapp-mode .tls-headline-row {
  flex-wrap: wrap;
}

.tls-inline-sample-btn {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  color: #0f172a;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
  padding: 4px 11px 4px 7px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: all 0.16s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.tls-inline-sample-btn:hover {
  background: linear-gradient(180deg, #f1f5f9 0%, #dbeafe 100%);
  color: #0f172a;
  border-color: #64748b;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.38);
}

.tls-sample-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #334155;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 999px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
}

/* STEP 1-2 문맥 연동 동적 세부 사고유형 헤더 & 카테고리 필터 탭 */
.step1-subtype-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

.step1-subtype-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step1-subtype-badge {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.step1-subtype-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.step1-cat-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.step1-cat-pill {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.step1-cat-pill:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #eff6ff;
}

.step1-cat-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.sv-top-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.sv-matched-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(37, 99, 235, 0.94);
  color: #ffffff;
  border: 1px solid #93c5fd;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.45);
}

.input-focus-pulse {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.28) !important;
  border-color: #2563eb !important;
  transition: box-shadow 0.25s ease;
}

.tls-ai-engine-chip {
  background: rgba(255, 255, 255, 0.95);
  color: #065f46;
  border: 1.5px solid #34d399;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.10);
}

.tls-headline {
  font-size: 19.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.7px;
  line-height: 1.25;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-party-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
  width: 100%;
}

.sv-party-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.8px;
  line-height: 1.35;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-party-row .sv-ball {
  font-size: 10.5px;
  line-height: 1;
  flex-shrink: 0;
}

.sv-party-row .sv-party-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tls-blue {
  color: #38bdf8;
}

.tls-forensic-Point-box {
  background: rgba(30, 41, 59, 0.94);
  border: 1.5px solid #0284c7;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.tls-forensic-Point-box strong {
  color: #7dd3fc;
}

.tls-hang-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.tls-hang-icon {
  flex-shrink: 0;
  display: inline-block;
  line-height: 1.5;
  user-select: none;
}

.tls-hang-body {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  font-variant-numeric: tabular-nums;
}

.tls-compare-boxes {
  display: grid;
  grid-template-columns: 0.94fr 1.12fr 1.06fr;
  gap: 10px;
  align-items: stretch;
}

.tls-box {
  padding: 11px 10px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.tls-box.insurer {
  background: linear-gradient(180deg, #ffffff 0%, #ffe4e6 100%);
  border: 1.5px solid #fda4af;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.08);
}

.tls-box.ai {
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  border: 2px solid #2563eb;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tls-box.cta-box {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1.5px solid #047857;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.tls-box.cta-box:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.36);
  filter: brightness(1.04);
}

.tls-verdict-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.tls-verdict-pill.insurer-pill {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
}

.tls-verdict-pill.ai-pill {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.tls-verdict-pill.cta-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #ecfdf5;
  border: 1px solid rgba(167, 243, 208, 0.45);
}

.tls-b-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
}

.tls-b-label.cta-label {
  color: #a7f3d0;
}

.tls-b-val {
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.25;
}

.tls-b-val.rose {
  font-size: 14.5px;
  color: #e11d48;
}

.tls-b-val.blue {
  font-size: 14.5px;
  color: #2563eb;
}

.tls-b-val.cta-val {
  font-size: 14.5px;
  color: #ffffff;
}

.tls-b-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  line-height: 1.15;
}

.tls-b-sub.ai-sub {
  color: #1d4ed8;
}

.tls-b-sub.cta-sub {
  color: #a7f3d0;
}

.tls-tip-bar {
  width: 100%;
  background: rgba(6, 78, 59, 0.82);
  border: 1.5px solid #10b981;
  border-radius: 11px;
  padding: 9px 14px;
  font-size: 12.5px;
  color: #ecfdf5;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.14);
  display: flex;
  align-items: flex-start;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.tls-tip-bar strong {
  color: #6ee7b7;
}

@media (max-width: 960px) {
  .tls-top-grid {
    grid-template-columns: 1fr;
  }
  .tls-compare-boxes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .tls-compare-boxes {
    grid-template-columns: 1fr;
  }
  .tls-video-control-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

body.toss-miniapp-mode .toss-live-summary-card {
  padding: 14px;
}

body.toss-miniapp-mode .tls-top-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.toss-miniapp-mode .tls-headline {
  font-size: 20px;
}

body.toss-miniapp-mode .tls-tip-bar {
  flex-direction: column;
  align-items: stretch;
  text-align: left;
}

/* ★ 내 입장(A차량 피해/청구측 vs B차량 억울한 과실 감경 방어측) 전환 스위치 */
.party-role-switch-bar {
  margin-top: 10px;
  background: #ffffff;
  border: 1.5px solid #93c5fd;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.prs-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #1e3a8a;
  white-space: nowrap;
}

.prs-btn-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
}

.prs-btn {
  background: #f8fafc;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.35;
  text-align: center;
  transition: all 0.15s;
}

.prs-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.prs-btn.active[data-role="A"] {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.14);
}

.prs-btn.active[data-role="B"] {
  background: #fff1f2;
  color: #be123c;
  border-color: #e11d48;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.14);
}

@media (max-width: 780px) {
  .prs-btn-group {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ★ 백대영 전용 커스텀 엠블럼 로고 & 『세이포 & 로폭스』 움직이는 캐릭터 일러스트 배너 스타일
   ============================================================================ */
.baekdaeyoung-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  padding: 0;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
  flex-shrink: 0;
}

.bdy-logo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ★ 혼합 A 적용:
   - 바깥 박스 & 좌측 다크 네이비 프레임 = 상단 블랙박스 시연 박스(.toss-live-summary-card)와 100% 동일한 24px 포렌식 모눈(Grid) + 블루~민트 그라데이션 & 진파랑 실선(#3b82f6) + 다크 네이비 프레임(#0f172a)
   - 우측 세이포·로폭스 말풍선 & 배지 = 하단 블랙박스 업로드 드롭존(.dropzone-box)과 동일한 2px dashed 점선 테두리 + 파스텔 민트(#ecfdf5)/블루(#eff6ff) 배경 + 진초록/진파랑 솔리드 배지 */
.mascot-stage-banner {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 20px;
  align-items: stretch;
  background-color: #dbeafe;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(37, 99, 235, 0.14) 0%, transparent 46%),
    radial-gradient(circle at 88% 84%, rgba(16, 185, 129, 0.14) 0%, transparent 46%),
    linear-gradient(rgba(30, 64, 175, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, 0.065) 1px, transparent 1px),
    linear-gradient(135deg, #dbeafe 0%, #e0f2fe 52%, #d1fae5 100%);
  background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  border: 2px solid #3b82f6;
  border-radius: 22px;
  padding: 18px 22px;
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
}

.mascot-stage-banner.theme-detective {
  background-color: #eef2ff;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(79, 70, 229, 0.12) 0%, transparent 46%),
    radial-gradient(circle at 88% 84%, rgba(245, 158, 11, 0.12) 0%, transparent 46%),
    linear-gradient(rgba(67, 56, 202, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 56, 202, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #e0e7ff 0%, #eef2ff 55%, #fef3c7 100%);
  background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  border-color: #6366f1;
}

.mascot-stage-banner.theme-victory {
  background-color: #ecfdf5;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(16, 185, 129, 0.13) 0%, transparent 46%),
    radial-gradient(circle at 88% 84%, rgba(234, 179, 8, 0.13) 0%, transparent 46%),
    linear-gradient(rgba(5, 150, 105, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 150, 105, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #d1fae5 0%, #ecfdf5 50%, #fef9c3 100%);
  background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  border-color: #10b981;
}

.mascot-duo-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid #0284c7;
  border-radius: 18px;
  padding: 9px 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22), inset 0 0 0 1px rgba(56, 189, 248, 0.22);
}

.mascot-svg-stage {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-duo-svg {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.mascot-cap-top,
.mascot-cap-bot {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.mascot-cap-top {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.mascot-cap-bot {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.38);
}

@keyframes charFloatLeft {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

@keyframes charFloatRight {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4.5px); }
}

.char-float-left {
  animation: charFloatLeft 3.2s ease-in-out infinite;
}

.char-float-right {
  animation: charFloatRight 3.6s ease-in-out infinite 0.4s;
}

.mascot-dialogue-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.mdb-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.mascot-stage-banner .step-tag {
  background: #059669;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.22);
}

.mascot-stage-banner.theme-detective .step-tag {
  background: #4338ca;
  box-shadow: 0 2px 6px rgba(67, 56, 202, 0.22);
}

.mascot-stage-banner.theme-victory .step-tag {
  background: #047857;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.22);
}

.mascot-mood-pill {
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.96);
  color: #065f46;
  border: 1.5px solid #10b981;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.mascot-mood-pill.detective {
  background: rgba(255, 255, 255, 0.96);
  color: #4338ca;
  border-color: #818cf8;
}

.mascot-mood-pill.victory {
  background: rgba(255, 255, 255, 0.96);
  color: #854d0e;
  border-color: #facc15;
}

.mdb-headline {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.4px;
  line-height: 1.35;
}

.mascot-bubbles-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.m-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.m-bubble.seipo-bubble {
  background: rgba(236, 253, 245, 0.96);
  border: 2px dashed #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.08);
}

.m-bubble.lawfox-bubble {
  background: rgba(239, 246, 255, 0.96);
  border: 2px dashed #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.m-bubble.bubble-pop {
  transform: scale(1.015);
  border-color: #f59e0b;
}

.mb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
}

.seipo-bubble .mb-avatar {
  border-color: #34d399;
}

.lawfox-bubble .mb-avatar {
  border-color: #60a5fa;
}

.mb-content {
  flex: 1;
  min-width: 0;
}

.mb-name {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.m-bubble.clickable-bubble {
  cursor: pointer;
}

.m-bubble.clickable-bubble:hover {
  transform: translateY(-2px);
}

.mb-step-link {
  font-size: 11px;
  font-weight: 900;
  padding: 2.5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.mb-step-link.seipo-link {
  background: #059669;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.22);
}

.mb-step-link.lawfox-link {
  background: #2563eb;
  color: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
}

.seipo-bubble .mb-name strong {
  color: #047857;
}

.lawfox-bubble .mb-name strong {
  color: #1d4ed8;
}

.mb-content p {
  font-size: 12.8px;
  color: #1e293b;
  line-height: 1.52;
  margin: 0;
}

@media (max-width: 920px) {
  .mascot-stage-banner {
    grid-template-columns: 1fr;
  }
  .mascot-bubbles-stack {
    grid-template-columns: 1fr;
  }
}

body.toss-miniapp-mode .mascot-stage-banner {
  grid-template-columns: 1fr;
  padding: 14px;
}

body.toss-miniapp-mode .mascot-bubbles-stack {
  grid-template-columns: 1fr;
}

/* ============================================================================
   ★ 단일 표준(Pretendard Variable + 순수 CSS 자연 줄바꿈)
   - 인위적인 JS DOM 분리나 강제 음수 들여쓰기(text-indent) 없이
     토스 미니앱(460px) 및 모바일에서만 화면 밖 뚫림(overflow)을 자연스럽게 방지
   ============================================================================ */
body.toss-miniapp-mode .wizard-container {
  overflow-x: hidden;
}

body.toss-miniapp-mode .uc-matched-chart,
body.toss-miniapp-mode .token-save-pill,
body.toss-miniapp-mode .mascot-mood-pill,
body.toss-miniapp-mode .rh-top-badge,
body.toss-miniapp-mode .tls-b-val,
body.toss-miniapp-mode .q-chip,
body.toss-miniapp-mode .prs-btn,
body.toss-miniapp-mode .ex-chip,
body.toss-miniapp-mode .tool-chip,
body.toss-miniapp-mode .el-toggle,
body.toss-miniapp-mode .draw-btn,
body.toss-miniapp-mode .uc-kw-chip,
body.toss-miniapp-mode .applied-chip,
body.toss-miniapp-mode .mod-badge {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  height: auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

body.toss-miniapp-mode .party-role-switch-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

body.toss-miniapp-mode .prs-label {
  white-space: normal;
}

body.toss-miniapp-mode .prs-btn-group,
body.toss-miniapp-mode .tls-compare-boxes {
  grid-template-columns: 1fr !important;
}

body.toss-miniapp-mode .tls-left,
body.toss-miniapp-mode .tls-right {
  min-width: 0 !important;
  width: 100%;
}

body.toss-miniapp-mode .mp-header,
body.toss-miniapp-mode .mp-controls,
body.toss-miniapp-mode .mod-item {
  flex-wrap: wrap !important;
}

/* ============================================================================
   ★ 201개 사고 도표 쉬운 일상어 파인더 & 와이드 도표 선택 바 스타일
   ============================================================================ */
.btn-easy-chart-picker {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  transition: all 0.15s ease;
}

.btn-easy-chart-picker:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.btn-easy-chart-picker.small {
  padding: 7px 12px;
  font-size: 12px;
}

.selected-chart-live-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #60a5fa;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: all 0.25s ease;
}

.sclb-top-flex {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 14px;
  align-items: center;
}

.sclb-info-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.sclb-roles-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 12.5px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .sclb-roles-summary {
    grid-template-columns: 1fr;
  }
}

.sclb-role-a {
  color: #1e3a8a;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  padding: 8px 12px;
  border-radius: 8px;
}

.sclb-role-b {
  color: #991b1b;
  background: #ffe4e6;
  border: 1px solid #fda4af;
  padding: 8px 12px;
  border-radius: 8px;
}

.sclb-diagram-box {
  background: #0f172a;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.sclb-diagram-caption {
  font-size: 11px;
  font-weight: 800;
  color: #7dd3fc;
  text-align: center;
}

.sclb-diagram-svg-wrap {
  width: 100%;
  height: 92px;
}

.sclb-svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 820px) {
  .sclb-top-flex {
    grid-template-columns: 1fr;
  }
}

body.toss-miniapp-mode .sclb-top-flex {
  grid-template-columns: 1fr;
}

@keyframes flashChartBar {
  0% { transform: scale(1); border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.28); }
  100% { transform: scale(1); border-color: #60a5fa; box-shadow: none; }
}

.selected-chart-live-bar.flash-highlight {
  animation: flashChartBar 0.7s ease;
}

.sclb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sclb-pill {
  background: #1d4ed8;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sclb-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #0f172a;
}

.sclb-right {
  width: 100%;
}

.wide-chart-select {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 14px;
  border: 1.5px solid #93c5fd;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.wide-chart-select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.easy-chart-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.ecf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ecf-tab {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.ecf-tab.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.ecf-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #93c5fd;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
}

.easy-chart-cards-list {
  max-height: 420px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-right: 4px;
}

.easy-chart-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.easy-chart-item:hover {
  border-color: #60a5fa;
  background: #ffffff;
  transform: translateY(-1px);
}

.easy-chart-item.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.eci-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.eci-id-badge {
  font-size: 11px;
  font-weight: 800;
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 8px;
  border-radius: 999px;
}

.eci-ratio-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #059669;
}

.eci-easy-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.4;
}

.eci-roles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  color: #475569;
}

@media (max-width: 780px) {
  .easy-chart-cards-list {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================= */
/* ★ 블랙박스 영상 업로드 상태 배지 · 미업로드 안내바 · 추출 중 오버레이 스타일 */
/* ========================================================================= */
.no-video-notice-bar {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.no-video-notice-bar .nv-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.no-video-notice-bar .nv-desc {
  font-size: 12.5px;
  color: #475569;
  font-weight: 600;
}

.montage-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.montage-mode-badge.sim {
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.montage-mode-badge.real {
  background: #dcfce7;
  color: #166534;
  border: 1.5px solid #22c55e;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.18);
}

.dropzone-box.uploaded {
  border-color: #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
}

.dropzone-box.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
  transform: scale(1.01);
}

.montage-preview-wrap {
  position: relative;
}

.video-extracting-overlay {
  position: absolute;
  inset: 46px 12px 12px 12px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #ffffff;
}

.veo-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(56, 189, 248, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: veoSpin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes veoSpin {
  to {
    transform: rotate(360deg);
  }
}

.veo-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #f8fafc;
  margin-bottom: 5px;
}

.veo-sub {
  font-size: 12px;
  color: #93c5fd;
  font-weight: 600;
}

/* ★ STEP 3 상단 내 폰 보관 & PDF·진술서 발급 활성화 인라인 바 (4개 입력칸 1:1:1:1 동일 폭 + 5개 전체 높이 42px 완벽 통일) */
.gate-inline-form-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 280px !important;
  gap: 10px !important;
  align-items: end !important;
}

.gate-uniform-input,
.gate-uniform-btn {
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  font-size: 13.5px !important;
}

@media (max-width: 1040px) {
  .gate-inline-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .gate-inline-btn-col {
    grid-column: 1 / -1 !important;
  }
}

body.toss-miniapp-mode .gate-inline-form-grid {
  grid-template-columns: 1fr 1fr !important;
}

body.toss-miniapp-mode .gate-inline-btn-col {
  grid-column: 1 / -1 !important;
}

/* ========================================================================== */
/* ★ STEP 3 시각 증거 대구경 캐러셀 & 1:1 높이통일 비교 스테이지 (상용 리걸테크 HUD) */
/* ========================================================================== */
.ev-view-mode-bar {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}

.ev-mode-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.ev-mode-btn.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
}

.ev-carousel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.ev-tabs-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.ev-tab-pill {
  flex: 1 1 260px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 13.5px;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.ev-tab-pill:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
}

.ev-tab-pill.active {
  background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%);
  color: #ffffff;
  border-color: #1e40af;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.ev-nav-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ev-arrow-btn {
  border: 1.5px solid #94a3b8;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ev-arrow-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.ev-slide-counter {
  font-size: 12.5px;
  font-weight: 900;
  color: #1e40af;
  min-width: 42px;
  text-align: center;
}

/* 캐러셀 모드(기본): 1장씩 전체 가로폭으로 큼직하게 표시 */
.evidence-stage-wrap.mode-carousel {
  display: block;
}

.evidence-stage-wrap.mode-carousel .ev-slide-card {
  display: none;
}

.evidence-stage-wrap.mode-carousel .ev-slide-card.active {
  display: block;
  animation: fadeInSlide 0.22s ease-out;
}

/* 1:1 나란히 비교 모드: 2열 동일 폭 + 동일 세로 높이 강제 */
.evidence-stage-wrap.mode-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.evidence-stage-wrap.mode-split .ev-slide-card {
  display: flex !important;
  flex-direction: column;
}

@media (max-width: 920px) {
  .evidence-stage-wrap.mode-split {
    grid-template-columns: 1fr;
  }
}

body.toss-miniapp-mode .evidence-stage-wrap.mode-split {
  grid-template-columns: 1fr !important;
}

@keyframes fadeInSlide {
  from {
    opacity: 0.4;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ev-slide-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ev-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ev-step-badge {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 999px;
  margin-right: 4px;
}

.ev-card-title {
  font-size: 17.5px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* ★ 당사자 A / 상대방 B / 도로교통법 근거 2줄 들여쓰기 요약 배너 (REA 한국어 타이포그래피 & 들여쓰기 `-` 적용) */
.ev-party-law-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ev-pl-item {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.ev-pl-head {
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.ev-pl-sub {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.52;
  padding-left: 16px;
  text-indent: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* ★ 3페이지 문서형 오픈 프레임워크 (REA korean-typography-toss-ui + impeccable 내어쓰기 표준)
   Step 1 UI는 전혀 건드리지 않고, Step 3 내 모든 '-' 기호 하위 설명 행이 1행/2행 정확히 동일한 X좌표에서 시작하도록 고정 */
.s3-doc-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 14px;
}

.s3-hang-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.s3-hang-bullet {
  flex: 0 0 10px;
  font-weight: 900;
  text-align: center;
  line-height: 1.52;
  user-select: none;
  opacity: 0.85;
}

.s3-hang-body {
  flex: 1 1 auto;
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.ev-pl-a {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e3a8a;
}

.ev-pl-b {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}

.ev-pl-law {
  grid-column: 1 / -1;
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  color: #92400e;
  font-size: 14.5px;
}

@media (max-width: 760px) {
  .ev-party-law-bar {
    grid-template-columns: 1fr;
  }
}

/* ★ 세로 스크롤을 활용해 그림과 하단 설명·거리 구간이 넉넉한 높이로 큼직하게 보이도록 자연 높이(height: auto) + 밝은 슬레이트 프레임 적용 */
.ev-forensic-frame {
  position: relative;
  width: 100%;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

.ev-forensic-frame .ev-img {
  width: 100%;
  height: auto;
  border: none;
  border-radius: 10px;
  display: block;
}

/* ★ STEP 1 위→아래 순차 진행(🐶 ① 세이포 초록 입력 ➔ 🦊 ② 로폭스 파란 확인) 전용 스타일 */
.step1-flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: -10px 0;
  z-index: 2;
}

.step1-flow-connector .sfc-line {
  width: 48px;
  height: 2px;
  border-radius: 2px;
  background: #cbd5e1;
}

.step1-flow-connector.to-seipo .sfc-line {
  background: #6ee7b7;
}

.step1-flow-connector.to-lawfox .sfc-line {
  background: #93c5fd;
}

.sfc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.sfc-pill.seipo {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #10b981;
}

.sfc-pill.lawfox {
  background: #eff6ff;
  color: #1e40af;
  border: 1.5px solid #3b82f6;
}

.step1-seq-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  border-radius: 12px;
}

.detected-chart-card .step1-seq-header {
  background: #eff6ff;
  border-color: #93c5fd;
}

.step1-seq-header.between {
  justify-content: space-between;
}

.step1-seq-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 240px;
}

.scenario-picker-label {
  margin-top: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.step1-seq-badge {
  background: #059669;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.22);
}

.step1-seq-badge.badge-step2 {
  background: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.step1-seq-badge.badge-step3 {
  background: #0f172a;
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.step1-seq-sub {
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}

.nl-detection-feedback-banner {
  margin-top: 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
  border: 2px solid #10b981;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.14);
  animation: fadeIn 0.25s ease;
}

.ndfb-left {
  flex: 1;
  min-width: 260px;
}

.ndfb-title {
  font-size: 14.5px;
  color: #065f46;
  margin-bottom: 4px;
}

.ndfb-sub {
  font-size: 12.5px;
  color: #1e293b;
  line-height: 1.55;
}

.ndfb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.step1-upload-integrated-wrap {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid #6ee7b7;
}

.step1-auto-prefill-box {
  margin-top: 10px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
}

.sap-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sap-chips-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.sap-val-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.sap-val-chip strong {
  color: #1d4ed8;
  font-weight: 900;
}

.sap-val-chip.mod-active {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
  font-weight: 800;
}

.sap-val-chip.mod-active strong {
  color: #1d4ed8;
}

.sap-edit-hint {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.sap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.sap-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sap-badge {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
  font-size: 11.5px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
}

.sap-header-desc {
  font-size: 12.5px;
  color: #334155;
}

.sap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .sap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .sap-grid {
    grid-template-columns: 1fr;
  }
}

.sap-item {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 12px;
}

.sap-item-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 3px;
}

.sap-item-val {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.sap-mods-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  padding: 8px 12px;
}

.sap-mods-title {
  font-size: 12px;
  font-weight: 900;
  color: #1e40af;
}

.sap-mods-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sap-mod-chip {
  background: #ffffff;
  border: 1px solid #60a5fa;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.sap-mod-chip.neutral {
  border-color: #cbd5e1;
  color: #475569;
}

.sap-kw-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}

.sap-kw-title {
  font-weight: 800;
  color: #1d4ed8;
}

.sap-kw-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.step-footer-hint {
  font-size: 13.5px;
  font-weight: 800;
  color: #1e40af;
}

/* ★ STEP 3 (승소 진술서) 섹션 간 여백 및 내부 박스 호흡감 개선 */
#step3ProtectedBody {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

#step-3 .report-top-bar {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  flex-wrap: nowrap;
}

#step-3 .report-top-bar button {
  padding: 8px 13px;
  font-size: 12.5px;
}

@media (max-width: 980px) {
  #step-3 .report-top-bar {
    flex-wrap: wrap;
  }
}

#step-3 .card-head-between {
  gap: 14px;
  margin-bottom: 16px;
}

#step-3 .clean-card {
  padding: 24px 26px;
}

#step-3 .card-sec-title {
  margin-bottom: 18px;
}

#step-3 .ev-carousel-toolbar {
  margin-bottom: 16px;
}

#step-3 .ev-party-law-bar {
  gap: 14px;
  margin-bottom: 18px;
}

#step-3 .ev-pl-item {
  padding: 14px 18px;
}

#step-3 .precedents-stack {
  gap: 16px;
}

#step-3 .precedent-card {
  padding: 18px 22px;
}

#step-3 .precedent-card .p-header {
  margin-bottom: 8px;
}

#step-3 .precedent-card .p-title {
  margin-bottom: 10px;
}

#step-3 .precedent-card .s3-doc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#step-3 .kpi-4-grid {
  gap: 16px;
}

#step-3 .kpi-box {
  padding: 16px 18px;
}

#step-3 .strategies-3-grid {
  gap: 16px;
}

#step-3 .strategy-card {
  padding: 20px;
  gap: 12px;
}

#step-3 .strategy-card .s-metrics {
  gap: 7px;
  padding: 12px 14px;
}

#step-3 .partner-match-banner {
  margin-top: 22px;
  padding: 20px 24px;
  gap: 20px;
  flex-wrap: nowrap;
}

#step-3 .partner-match-banner h4 {
  margin: 8px 0 6px;
  font-size: 15.5px;
  line-height: 1.4;
}

#step-3 .partner-match-banner p {
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 880px) {
  #step-3 .partner-match-banner {
    flex-wrap: wrap;
  }
}

#step-3 .clean-statement-editor {
  margin-top: 16px;
  padding: 22px 26px;
  line-height: 1.82;
}


.btn-role-swap-inline {
  background: #ffffff;
  color: #1d4ed8;
  border: 1.5px solid #60a5fa;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.12);
}
.btn-role-swap-inline:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* ★ 모바일 및 토스 미니앱 뷰포트(720px 이하) 깨짐 방지 반응형 보정 */
@media (max-width: 720px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
  }
  .header-inner .brand-area {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }
  .header-inner .header-actions {
    order: 2;
    width: auto;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
    justify-content: flex-end;
    gap: 6px;
  }
  .header-inner .step-nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }
  .header-inner .step-nav .step-line {
    display: none;
  }
  .header-inner .step-nav .step-pill {
    width: 100%;
    justify-content: center;
    padding: 7px 4px;
    font-size: 12px;
    white-space: nowrap;
  }
  .s2r-line {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: 9px 10px;
  }
  .s2r-line-badge {
    align-self: flex-start;
  }
  .s2r-chips-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 5px;
  }
  .s2r-chip {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 9px;
    padding: 6px 10px;
    line-height: 1.45;
  }
  .s2r-edit-hint {
    margin-left: 0;
    align-self: flex-end;
  }
  .step-footer-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .step-footer-hint {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12.5px;
    line-height: 1.45;
  }
  .step-footer-bar .btn-lg {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    padding: 13px 16px;
  }
  .gpb-party-pills {
    grid-template-columns: 1fr !important;
  }
  #step-3 .clean-card {
    padding: 16px 14px;
  }
  #step-3 .clean-statement-editor {
    padding: 14px 12px;
    font-size: 12.5px;
    line-height: 1.65;
  }
}

/* ★ 토스 미니앱(Apps in Toss) 실제 웹뷰(?platform=toss 또는 TossApp UA) 진입 시:
   일반 웹사이트에서는 기존 상단 헤더(.app-header)를 100% 그대로 보여주고,
   토스 앱 내부 웹뷰에서 열릴 때는 토스 네이티브 상단바와 중복되는 브랜드 로고(.brand-area)와 PC 프리뷰 토글(#btnToggleMobileFrame)만 숨기며,
   1·2·3단계 위저드 탭(.step-nav)과 내 사건 보관함(#btnOpenUserGateTop)은 슬림한 상단 서브바로 온전히 유지합니다. */
body.in-toss-webview .app-header .brand-area,
body.in-toss-webview #btnToggleMobileFrame,
body.in-toss-webview #partnerWhiteLabelTopBanner {
  display: none !important;
}
body.in-toss-webview .app-header {
  padding: 6px 10px;
}
body.in-toss-webview .app-header .header-inner {
  justify-content: space-between;
  gap: 8px;
}
body.in-toss-webview .app-header .header-actions {
  order: 0;
  width: auto;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
