:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F3F1EC;
  --surface-3: #E8E5DD;
  --ink: #1A1A17;
  --ink-2: #44443F;
  --ink-3: #75736B;
  --ink-4: #A8A59B;
  --border: rgba(26, 26, 23, 0.08);
  --border-strong: rgba(26, 26, 23, 0.16);
  --accent: #2D4A2B;
  --accent-ink: #1F3320;
  --accent-bg: #E8EDDF;
  --green-bg: #E3ECC8;
  --green-ink: #2F4519;
  --amber-bg: #F5E9D4;
  --amber-ink: #6B3D11;
  --ai-purple: #3D2D6B;
  --ai-bg: #F4F0FE;
  --ai-border: #E0D6F5;
  --amber: #B5651D;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Top nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--border);
}
.nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.brand {
  font-family: 'Instrument Serif', serif;
  font-size: 26px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 8px;
  line-height: 1.1;
}
.brand i { font-size: 22px; color: var(--accent); }
.brand em { font-style: italic; color: var(--accent); }
.brand-tagline { font-size: 13px; color: var(--ink-3); padding-left: 30px; }
.nav-right { display: flex; align-items: center; gap: 16px; color: var(--ink-2); }
.avatar-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.nav-close {
  font-size: 22px; color: var(--ink-3); cursor: pointer;
}

/* Container */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* Page header */
.page-head { margin-bottom: 28px; }
.page-title {
  font-family: 'Instrument Serif', serif;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.page-subtitle { font-size: 14px; color: var(--ink-3); }

/* Progress steps */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-4);
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
}
.step.done .step-num { background: var(--accent); color: var(--bg); }
.step.active .step-num { background: var(--accent); color: var(--bg); }
.step.done, .step.active { color: var(--ink); font-weight: 500; }
.step-line {
  flex: 1;
  height: 0.5px;
  background: var(--border-strong);
  margin: 0 12px;
}
.step.done + .step-line { background: var(--accent); }

/* Section card */
.section {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title i { font-size: 17px; color: var(--accent); }

/* Photo upload */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.photo-cell {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.photo-cell.filled {
  border: 0.5px solid var(--border);
}
.photo-cell.filled.main { border: 1.5px solid var(--accent); }
.photo-img-dark { background: radial-gradient(circle at 30% 20%, #4A4843 0%, #1A1A17 70%); display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.photo-img-dark svg { width: 90%; }
.photo-img-uploaded {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-counter {
  font-size: 12px;
  color: var(--ink-3);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
}
.photo-cell .badge-main {
  position: absolute;
  top: 6px; left: 6px;
  font-size: 9px;
  padding: 2px 6px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  font-weight: 500;
}
.photo-cell .photo-del {
  position: absolute;
  top: 6px; right: 6px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,0.5);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  backdrop-filter: blur(4px);
}
.photo-add {
  aspect-ratio: 1;
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-3);
  cursor: pointer;
  background: var(--surface-2);
  transition: all 0.12s;
}
.photo-add:hover { border-color: var(--accent); color: var(--accent); }
.photo-add i { font-size: 22px; }
.photo-add-label { font-size: 11px; }
.photo-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 10px;
}

/* Model input */
.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.field { flex: 1; }
.field-label {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}
.field-input {
  width: 100%;
  padding: 11px 14px;
  border: 0.5px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
.field-input::placeholder { color: var(--ink-4); }
.field-input:focus { outline: none; border-color: var(--accent); }
.btn-analyze {
  padding: 11px 20px;
  background: var(--ai-purple);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.btn-analyze:hover { opacity: 0.9; }
.btn-analyze i { font-size: 16px; }

/* AI analyzed result section */
.ai-section {
  background: var(--ai-bg);
  border: 0.5px solid var(--ai-border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}
.ai-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.ai-section-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ai-purple);
}
.ai-section-title .serif-em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
}
.ai-badge {
  font-size: 10px;
  padding: 3px 9px;
  background: var(--ai-purple);
  color: white;
  border-radius: 100px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-badge i { font-size: 11px; }
.ai-section-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.ai-confidence {
  color: var(--ai-purple);
  font-weight: 500;
}

/* AI auto-filled field */
.ai-field {
  margin-bottom: 16px;
}
.ai-field:last-child { margin-bottom: 0; }
.ai-field-label {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-tag {
  font-size: 9px;
  padding: 1px 6px;
  background: var(--ai-purple);
  color: white;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ai-tag i { font-size: 9px; }

.ai-value-box {
  background: var(--surface);
  border: 0.5px solid var(--ai-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.ai-value-main {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.ai-value-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.5;
}

/* Category breadcrumb result */
.cat-result {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-chip {
  padding: 6px 12px;
  background: var(--accent-bg);
  color: var(--accent-ink);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.cat-arrow { color: var(--ink-4); font-size: 13px; }
.cat-edit {
  font-size: 12px;
  color: var(--ink-3);
  margin-left: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cat-edit:hover { color: var(--accent); }

/* Specs grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.spec-box {
  background: var(--surface);
  border: 0.5px solid var(--ai-border);
  border-radius: 10px;
  padding: 11px 13px;
}
.spec-label { font-size: 10px; color: var(--ink-3); margin-bottom: 3px; }
.spec-value { font-size: 14px; font-weight: 500; }

/* Level slider */
.level-track {
  position: relative;
  height: 5px;
  background: linear-gradient(90deg, #C8D8B8 0%, #E2A857 50%, #C25B4E 100%);
  border-radius: 100px;
  margin: 14px 4px 10px;
}
.level-knob {
  position: absolute;
  top: 50%;
  left: 62%;
  width: 16px; height: 16px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.level-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-3);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
  padding: 0 4px;
}

/* Use chips */
.use-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.use-chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--green-bg);
  color: var(--green-ink);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.use-chip i { font-size: 12px; }
.use-chip.off {
  background: var(--surface-2);
  color: var(--ink-4);
}

/* AI opinion box */
.ai-opinion {
  background: rgba(61, 45, 107, 0.06);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
}
.ai-opinion-label {
  font-size: 10px;
  color: var(--ai-purple);
  font-weight: 600;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Price suggestion */
.price-suggest {
  background: var(--surface);
  border: 0.5px solid var(--ai-border);
  border-radius: 10px;
  padding: 14px;
}
.price-suggest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.price-suggest-label { font-size: 12px; color: var(--ink-3); }
.price-suggest-value {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
}
.price-bar {
  position: relative;
  height: 6px;
  background: var(--surface-3);
  border-radius: 100px;
  margin: 12px 0 6px;
}
.price-bar-fill {
  position: absolute;
  left: 18%;
  right: 22%;
  top: 0; bottom: 0;
  background: var(--accent);
  border-radius: 100px;
  opacity: 0.3;
}
.price-bar-marker {
  position: absolute;
  left: 48%;
  top: 50%;
  width: 12px; height: 12px;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-4);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
}

/* Manual fields (price, condition, memo) */
.form-section { margin-bottom: 18px; }
.form-section:last-child { margin-bottom: 0; }
.price-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.price-input-wrap .won {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: var(--ink-3);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
}
.price-input {
  width: 100%;
  padding: 13px 14px 13px 32px;
  border: 0.5px solid var(--border-strong);
  border-radius: 10px;
  font-size: 18px;
  font-family: 'Instrument Serif', serif;
  background: var(--surface);
  color: var(--ink);
}
.price-input:focus { outline: none; border-color: var(--accent); }
.price-helper {
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.price-helper i { font-size: 13px; }

/* Condition grade selector */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.grade-option {
  padding: 12px 10px;
  border: 0.5px solid var(--border-strong);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s;
}
.grade-option:hover { border-color: var(--accent); }
.grade-option.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.grade-letter {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  color: var(--ink);
}
.grade-name { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.grade-option.selected .grade-name { color: var(--accent-ink); }

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { display: flex; align-items: center; gap: 10px; }
.toggle-info i { font-size: 18px; color: var(--accent); }
.toggle-label { font-size: 13px; font-weight: 500; }
.toggle-desc { font-size: 11px; color: var(--ink-3); }
.toggle-switch {
  width: 40px; height: 22px;
  background: var(--accent);
  border-radius: 100px;
  position: relative;
  cursor: pointer;
}
.toggle-switch.off { background: var(--surface-3); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
}
.toggle-switch.off::after { right: auto; left: 2px; }

/* Memo textarea */
.memo-area {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 0.5px solid var(--border-strong);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
}
.memo-area:focus { outline: none; border-color: var(--accent); }

/* Submit bar */
.submit-bar {
  position: sticky;
  bottom: 0;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--border);
  padding: 16px 0;
  margin-top: 8px;
}
.submit-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.submit-summary { font-size: 13px; color: var(--ink-3); }
.submit-summary strong {
  color: var(--ink);
  font-weight: 500;
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
}
.btn-submit {
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.btn-submit:hover { background: var(--accent-ink); }
.btn-submit i { font-size: 17px; }

.section-divider {
  text-align: center;
  font-size: 12px;
  color: var(--ink-4);
  margin: 24px 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
