/* 참고폴더 style.css 톤을 맞춘 퍼스널 컬러 UI */
:root {
  --primary-color: #111827;
  --primary-light: #1f2937;
  --bg-primary: #fafafa;
  --bg-white: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  --success: #10b981;
  --error: #dc3545;
  --warning: #f59e0b;
  --border-light: #e5e7eb;
  --font-sm: 14px;
  --font-md: 15px;
  --font-lg: 17px;
  --font-xl: 22px;
  --font-2xl: 28px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.cf-body {
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "돋움",
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

.cf-topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.cf-brand {
  font-weight: 700;
  font-size: var(--font-lg);
  color: var(--primary-color);
  text-decoration: none;
}

.cf-nav-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.cf-nav-tagline {
  color: #2563eb;
}

.cf-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.contentTitle {
  font-size: var(--font-xl);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contentTitle .material-symbols-outlined {
  font-size: 28px;
}

.card {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.card-header {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}

.cf-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: var(--font-sm);
}

.cf-muted {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.cf-upload-hint {
  color: #2563eb;
  margin-bottom: 12px;
}

.cf-tiny {
  font-size: 12px;
  color: var(--text-muted);
}

.cf-upload-preview {
  margin: 16px 0;
  min-height: 120px;
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cf-upload-preview img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
}

.cf-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  justify-content: center;
}

.cf-preview-grid img {
  max-width: 32%;
  min-width: 100px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.cf-upload-preview.cf-upload-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

.cf-camera-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cf-upload-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.cf-camera-btn .material-symbols-outlined {
  font-size: 22px;
}

.cf-bg-tip {
  margin-top: 14px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #6366f1;
  font-size: 13px;
}

.cf-hidden {
  display: none !important;
}

.cf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: var(--font-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cf-status {
  margin-top: 14px;
  padding: 10px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 13px;
}

.cf-alert {
  margin-top: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.cf-loading {
  margin-top: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cf-last-result {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-light);
}

.cf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.cf-chip-row-large {
  gap: 14px;
}

.cf-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
}

.cf-chip-lg {
  min-width: 200px;
}

.cf-chip-swatch {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.cf-chip-swatch-lg {
  width: 48px;
  height: 48px;
}

.cf-chip-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.cf-chip-title {
  font-weight: 600;
  font-size: 13px;
}

.cf-hero {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 260px);
  gap: 20px;
  align-items: start;
}

@media (max-width: 720px) {
  .cf-hero {
    grid-template-columns: 1fr;
  }
}

.cf-hero-text h2 {
  font-size: var(--font-2xl);
  margin-bottom: 8px;
}

.cf-reliability {
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f9fafb, #eef2ff);
  border: 1px solid var(--border-light);
}

.cf-reliability-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cf-reliability-value {
  font-size: var(--font-xl);
  font-weight: 700;
  margin: 4px 0 10px;
}

.cf-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.cf-meter-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.cf-reliability-detail {
  margin-top: 10px;
  font-size: 13px;
}

.cf-table-wrap {
  overflow-x: auto;
}

.cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cf-table th,
.cf-table td {
  border-bottom: 1px solid var(--border-light);
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
}

.cf-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.cf-row-active {
  background: #f5f3ff;
}

.cf-mini-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.cf-link {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

.cf-link:hover {
  text-decoration: underline;
}

/* 카메라 단계 UI */
.cf-stage {
  margin-top: 4px;
}

.cf-stage-landing .cf-upload-hint {
  margin-bottom: 20px;
}

.cf-landing-camera {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0 8px;
}

.cf-btn-camera-main {
  padding: 18px 32px;
  font-size: var(--font-lg);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.2);
}

.cf-btn-camera-main .material-symbols-outlined {
  font-size: 28px;
}

.cf-live-viewport {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.cf-live-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.cf-face-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cf-face-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  -webkit-mask-image: radial-gradient(
    ellipse 44% 52% at 50% 46%,
    transparent 69%,
    black 71%
  );
  mask-image: radial-gradient(
    ellipse 44% 52% at 50% 46%,
    transparent 69%,
    black 71%
  );
}

.cf-face-ring {
  position: relative;
  z-index: 2;
  width: 78%;
  max-width: 272px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.cf-live-hint {
  text-align: center;
  margin-top: 12px;
  margin-bottom: 0;
}

.cf-live-actions {
  justify-content: center;
  margin-top: 14px;
}

.cf-capture-preview {
  margin-top: 0;
  padding: 0;
  border: none;
  background: #f3f4f6;
  min-height: 200px;
}

.cf-captured-img {
  width: 100%;
  max-height: min(420px, 62vh);
  object-fit: contain;
  display: block;
}
