* {
  box-sizing: border-box;
}
[hidden],
.hidden {
  display: none !important;
}
body {
  margin: 0;
  background: #080e19;
  color: #e2e8f0;
}
button,
summary {
  cursor: pointer;
}
button {
  font: inherit;
}
.ear-guide-toolbar button {
  background: #1e293b;
  color: #cbd5e1;
}
.ear-edit-layout {
  align-items: start;
}
#earPhotoStage {
  position: relative;
}
#earPhotoMarkers {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  pointer-events: none;
}
.ear-photo-marker {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: none;
  border: 2px dashed #94a3b8;
  background: #0f172af2;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.ear-photo-marker[data-status="candidate"] {
  border-style: solid;
  border-color: #fbbf24;
  color: #fbbf24;
}
.ear-photo-marker[data-status="confirmed"] {
  border-style: solid;
  border-color: #22d3ee;
  color: #22d3ee;
}
.ear-photo-marker[aria-pressed="true"] {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.side-storage {
  margin-top: 16px;
  font-size: 12px;
  color: #94a3b8;
}
.side-storage pre {
  max-height: 250px;
  overflow: auto;
  padding: 12px;
  font-size: 11px;
  background: #080e19;
  border-radius: 8px;
}
#sideReferenceSelect {
  max-width: 100%;
  background: #1e293b;
  color: #e2e8f0;
  padding: 8px;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 12px;
}
#frontThirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 900px) {
  #viewEarSingle .ear-edit-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  #earPointControls {
    position: sticky;
    top: 16px;
  }
}
#btnCancelEarPoint {
  background: #1e293b;
  color: #cbd5e1;
}
#earPointControls > p:first-child {
  font-size: 12px;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 3px;
}
.photo-header {
  max-width: 1440px;
  margin: auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
  color: #94a3b8;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  text-decoration: none;
}
.brand span {
  color: #67e8f9;
  font-size: 13px;
  margin-left: 8px;
}
.photo-workspace {
  max-width: 1440px;
  margin: auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.photo-inputs {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.photo-intro {
  padding: 4px 0 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #67e8f9;
}
.photo-intro h1 {
  font-size: 30px;
  line-height: 1.35;
  margin: 12px 0;
  letter-spacing: -1px;
}
.photo-intro p {
  color: #94a3b8;
  font-size: 12px;
}
.photo-card {
  padding: 18px;
  border: 1px solid #263247;
  border-radius: 16px;
  background: #101a2a;
}
.photo-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.photo-card h2 {
  margin: 0;
  font-size: 15px;
}
.photo-card p {
  font-size: 12px;
  line-height: 1.6;
  color: #94a3b8;
  margin: 10px 0 14px;
}
.photo-state {
  font-size: 10px;
  color: #94a3b8;
  border: 1px solid #334155;
  padding: 3px 7px;
  border-radius: 99px;
}
.photo-state.ready {
  color: #67e8f9;
  border-color: #155e75;
}
.photo-upload {
  width: 100%;
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0b1422;
  color: #cbd5e1;
  border: 1px dashed #475569;
  border-radius: 10px;
  font-size: 12px;
}
.photo-upload:hover {
  border-color: #67e8f9;
}
.photo-upload img {
  width: 60px;
  height: 78px;
  object-fit: contain;
  border-radius: 6px;
}
.capture-button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: #1e293b;
  color: #e2e8f0;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
}
.photo-review {
  border: 1px solid #263247;
  border-radius: 20px;
  background: #101827;
  min-width: 0;
  overflow: hidden;
}
.review-heading {
  padding: 22px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.review-heading h2 {
  font-size: 16px;
  margin: 0;
}
.review-heading span {
  font-size: 11px;
  color: #94a3b8;
}
.photo-tabs {
  display: flex;
  padding: 0 24px;
  gap: 6px;
  border-bottom: 1px solid #263247;
}
.photo-tabs button {
  flex: 1;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 6px;
  color: #94a3b8;
  font-size: 13px;
}
.photo-tabs button[aria-selected="true"] {
  color: #67e8f9;
  border-color: #22d3ee;
  background: #0e749014;
}
.photo-panel {
  padding: 22px;
  min-width: 0;
}
.photo-canvas-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: #080f1b;
  border-radius: 12px;
  overflow: hidden;
}
.photo-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  touch-action: none;
}
.photo-canvas-wrap.fit-content-wrap {
  min-height: 0;
  padding: 0;
  margin: 0 auto;
}
.front-manual-hint,
.ear-simple-hint {
  font-size: 12px;
  color: #94a3b8;
  padding: 8px 0 4px;
  line-height: 1.5;
}
.ear-sample-guide-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
}
.ear-sample-title {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.btn-flip-guide {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  cursor: pointer;
}
.btn-flip-guide:hover {
  color: #f8fafc;
  border-color: #64748b;
}
.ear-guide-desc {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}
.ear-save-actions {
  justify-content: center;
  margin-top: 14px;
}
.wizard-step.is-saved-locked {
  pointer-events: none !important;
  cursor: default !important;
  opacity: 0.65;
}
.photo-empty {
  position: absolute;
  left: 12px;
  right: 12px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  pointer-events: none;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.photo-actions button,
.report-link {
  border: 1px solid #334155;
  background: #1e293b;
  border-radius: 8px;
  padding: 9px 12px;
  color: #e2e8f0;
  font-size: 12px;
}
.photo-actions .primary-action {
  background: #0e7490;
  border-color: #0891b2;
  color: #ecfeff;
}
.photo-actions label {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  gap: 4px;
}
.panel-note {
  margin: 12px 0;
  font-size: 12px;
  line-height: 1.7;
  color: #94a3b8;
}
.photo-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.photo-metrics > div {
  padding: 12px;
  border: 1px solid #263247;
  border-radius: 10px;
  font-size: 11px;
  color: #94a3b8;
}
.photo-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #a5f3fc;
}
.report-link {
  margin-top: 14px;
}
.ear-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.ear-guide-caption {
  font-size: 11px;
}
.ear-point-guide summary {
  font-size: 12px;
  color: #a5f3fc;
  padding: 4px 0;
}
.ear-guide-toolbar {
  margin-top: 10px;
}
#earPointControls {
  padding: 14px;
  border: 1px solid #263247;
  border-radius: 12px;
}
#earPointList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
#earPointList > div {
  display: flex;
  align-items: center;
}
#earPointList button {
  font-size: 11px;
}
.ear-point-button {
  padding: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #cbd5e1;
  border-radius: 8px;
  width: 100%;
  text-align: left;
}
#btnConfirmEarPoints,
#btnCancelEarPoint {
  padding: 8px;
  font-size: 12px;
  border: 1px solid #334155;
  border-radius: 6px;
}
#btnConfirmEarPoints {
  background: #22d3ee;
  color: #083344;
}
#earPointStatus {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.7;
  margin-top: 8px;
}
.photo-error {
  color: #fda4af;
  font-size: 12px;
  line-height: 1.6;
}
.photo-footer {
  grid-column: 1/-1;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
  color: #64748b;
  padding: 12px;
}
#analysisReport {
  grid-column: 1/-1;
  min-width: 0;
  padding: 24px;
  overflow: hidden;
}
.camera-dialog {
  background: #101827;
  color: #e2e8f0;
  padding: 20px;
  border: 1px solid #334155;
  border-radius: 16px;
  width: min(560px, 94vw);
}
.camera-dialog::backdrop {
  background: #020617d9;
}
.camera-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.camera-heading h2 {
  font-size: 17px;
}
.camera-heading button {
  background: none;
  border: 0;
  color: #e2e8f0;
}
.camera-dialog p {
  font-size: 12px;
  color: #94a3b8;
}
.camera-dialog video {
  display: block;
  width: 100%;
  max-height: 55vh;
  margin-top: 12px;
  background: #020617;
  border-radius: 10px;
}
#cropCanvas {
  touch-action: none;
  max-width: 100%;
  height: auto;
}
#cropCanvasWrapper {
  min-height: 0;
}
#earCropModal {
  overflow-y: auto;
}
#earCropModal > div {
  width: min(800px, 100%);
  height: min(720px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 16px;
  gap: 12px;
  margin: auto;
}
#earCropModal > div > div {
  margin: 0;
}
#earCropModal > div > div:first-child,
#earCropModal > div > div:last-child {
  flex-shrink: 0;
}
#earCropModal #cropCanvasWrapper {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
}
#cropCanvas {
  object-fit: contain;
  max-height: 100%;
  width: auto;
}
#earCropModal > div > div:last-child {
  position: sticky;
  bottom: 0;
  background: #101827;
  padding: 10px 0 0;
  z-index: 1;
}
#btnApplyCrop {
  display: inline-flex;
  background: #22d3ee;
  color: #083344;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 800;
}
#btnCloseCropModal {
  min-width: 32px;
  min-height: 32px;
  color: #e2e8f0;
  font-size: 22px;
}
@media (min-width: 1280px) {
  .ear-edit-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .ear-guide-marker {
    width: 28px;
    height: 28px;
  }
}
@media (max-width: 760px) {
  .photo-header {
    padding: 18px;
  }
  .photo-header > span {
    display: none;
  }
  .photo-workspace {
    padding: 18px 12px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .photo-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .photo-intro {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .photo-intro .eyebrow {
    display: none;
  }
  .photo-intro h1 {
    font-size: 22px;
    margin: 0;
  }
  .photo-intro br {
    display: none;
  }
  .photo-card {
    padding: 12px;
  }
  .photo-card h2 {
    font-size: 13px;
  }
  .photo-card p {
    min-height: 40px;
    font-size: 11px;
  }
  .photo-upload {
    height: 96px;
    flex-direction: column;
    gap: 4px;
  }
  .photo-upload img {
    height: 52px;
  }
  .photo-upload span {
    font-size: 11px;
  }
  .photo-error {
    grid-column: 1/-1;
  }
  .photo-panel {
    padding: 12px;
  }
  .review-heading {
    padding: 16px;
  }
  .photo-tabs {
    padding: 0 12px;
  }
  .photo-canvas-wrap {
    min-height: 240px;
  }
  .photo-metrics strong {
    font-size: 12px;
  }
}
#viewEarSingle .ear-edit-layout {
  grid-template-columns: minmax(0, 1fr) clamp(140px, 28vw, 280px);
}
#viewEarSingle .photo-canvas-wrap {
  min-height: 0;
}
@media (max-width: 760px) {
  #viewEarSingle .ear-edit-layout {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 140px;
  }
  #earPointControls {
    padding: 7px;
    position: sticky;
    top: 8px;
  }
  #earPointGuide {
    padding: 6px;
  }
  #earPointControls .ear-guide-caption,
  .ear-guide-toolbar strong {
    display: none;
  }
  .ear-guide-toolbar button {
    font-size: 10px;
    padding: 4px;
  }
  .ear-guide-explanation {
    font-size: 11px;
    line-height: 1.5;
    padding: 6px;
  }
  .ear-guide-marker {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  #viewEarSingle .photo-metrics {
    grid-template-columns: 1fr;
  }
  #viewEarSingle .photo-actions button {
    width: 100%;
    font-size: 11px;
    padding: 8px 4px;
  }
}


/* 사진 등록 완료 안내 배너 */
.photo-complete-banner {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(15, 23, 42, 0.9);
  text-align: center;
}
.photo-complete-banner .complete-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #fce08a;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.photo-complete-banner h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}
.photo-complete-banner p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}
.photo-complete-banner .complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.btn-goto-view {
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-goto-view:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(212, 175, 55, 0.5);
  color: #fce08a;
  transform: translateY(-1px);
}
.btn-goto-view.primary {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(180, 130, 20, 0.35));
  border-color: rgba(212, 175, 55, 0.6);
  color: #fef08a;
}
.btn-goto-view.primary:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.4), rgba(180, 130, 20, 0.5));
}

/* 관상 콘텐츠 미해금 화면 */
.gwansang-locked-view {
  margin: 1.5rem auto;
  max-width: 820px;
  padding: 3rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(15, 23, 42, 0.9);
  text-align: center;
}
.locked-icon-wrap {
  margin-bottom: 1rem;
}
.locked-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  border: 2px solid rgba(212, 175, 55, 0.4);
  font-size: 2rem;
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.2);
}
.locked-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.75rem;
}
.locked-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 620px;
  margin: 0 auto 2rem;
}
.locked-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
  text-align: left;
}
.locked-preview-card {
  position: relative;
  padding: 1.25rem;
  border-radius: 0.85rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(8px);
}
.preview-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.locked-preview-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 0.35rem;
}
.locked-preview-card p {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
}
.btn-register-photo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #fce08a 0%, #d4af37 50%, #c59b27 100%);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}
.btn-register-photo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.45);
}


/* ==========================================================================
   관상 등록 및 정밀 분석 인터랙션 고도화 스타일
   ========================================================================== */

/* 1. 상단 5단계 진행 위저드 바 */
.gwansang-wizard-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 14px 20px;
  margin: 0 auto 20px auto;
  max-width: 900px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.25s ease;
  user-select: none;
}
.wizard-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #334155;
  transition: all 0.25s ease;
}
.wizard-step.is-active {
  color: #38bdf8;
}
.wizard-step.is-active .step-num {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.wizard-step.is-completed {
  color: #94a3b8;
}
.wizard-step.is-completed .step-num {
  background: #065f46;
  color: #34d399;
  border-color: #059669;
}
.wizard-sep {
  color: #334155;
  font-size: 14px;
}

/* 2. 스캔 라인 빔 (가로선 하강 애니메이션) */
.scan-beam-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
  z-index: 10;
}
.scan-beam-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent 0%, #22d3ee 30%, #ffffff 50%, #22d3ee 70%, transparent 100%);
  box-shadow: 0 0 16px #22d3ee, 0 0 32px rgba(34, 211, 238, 0.7);
  opacity: 0;
  transform: translateY(-10px);
}
.scan-beam-line.scanning {
  opacity: 1;
  animation: scanSweepDown 1.15s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes scanSweepDown {
  0% { transform: translateY(-5px); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(485px); opacity: 0; }
}

/* 3. 스캔 진행 상태 안내 바 */
.scan-phase-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 10px 0 6px 0;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  font-size: 12px;
  color: #e0f2fe;
}
.scan-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 1.4s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* 4. 스텝 메인 액션 버튼 */
.photo-step-action-bar {
  margin-top: 14px;
}
.btn-step-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.35);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}
.btn-step-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}
.btn-step-primary:disabled {
  background: #1e293b;
  color: #64748b;
  border-color: #334155;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}
.btn-step-primary.ready {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
  animation: pulseBtn 2s infinite ease-in-out;
}
@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 15px rgba(6, 182, 212, 0.4); }
  50% { box-shadow: 0 0 25px rgba(6, 182, 212, 0.75); }
}
.step-nav-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* 5. 측면 분석 완료 후 귀 위치 확인 유도 패널 */
.ear-check-prompt {
  margin: 14px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(8, 51, 68, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 14px;
  box-shadow: 0 8px 24px -6px rgba(6, 182, 212, 0.25);
  animation: slideDownFade 0.35s ease-out;
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ear-check-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ear-check-icon {
  font-size: 24px;
  line-height: 1;
}
.ear-check-msg strong {
  display: block;
  font-size: 14px;
  color: #e0f2fe;
  margin-bottom: 4px;
}
.ear-check-msg p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}
.ear-check-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ear-check-actions .btn-secondary {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #475569;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ear-check-actions .btn-secondary:hover:not(:disabled) {
  background: #334155;
  color: #ffffff;
}
.ear-check-actions .btn-step-primary {
  flex: 1.5;
  min-width: 180px;
}

/* 사진 등록 전용 단계별 레이아웃 (첫 화면: 입력 메인, 다른 콘텐츠 숨김 / 분석 단계: 분석 화면 메인) */
.photo-workspace.is-step-upload {
  display: block;
  max-width: 840px;
  margin: 0 auto;
  padding: 32px 20px;
}
.photo-workspace.is-step-upload .photo-inputs {
  width: 100%;
  max-width: 100%;
}
.photo-workspace.is-step-upload .photo-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.photo-workspace.is-step-upload .photo-review,
.photo-workspace.is-step-upload #analysisReport,
.photo-workspace.is-step-upload #gwansangLockedView,
.photo-workspace.is-step-upload #gwansangUnlockCelebration {
  display: none !important;
}

.photo-workspace.is-step-analysis {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px;
}
.photo-workspace.is-step-analysis .photo-inputs {
  display: none !important;
}
.photo-workspace.is-step-analysis .photo-review {
  display: block !important;
  width: 100%;
}

/* 완료 (해금) 단계 레이아웃: 완벽한 중앙 배치 및 단독 노출 */
.photo-workspace[data-current-step="complete"],
.photo-workspace.is-step-complete {
  display: block !important;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 16px;
}
.photo-workspace[data-current-step="complete"] .photo-inputs,
.photo-workspace.is-step-complete .photo-inputs,
.photo-workspace[data-current-step="complete"] .photo-review,
.photo-workspace.is-step-complete .photo-review {
  display: none !important;
}
.photo-workspace[data-current-step="complete"] #gwansangUnlockCelebration,
.photo-workspace.is-step-complete #gwansangUnlockCelebration {
  display: block !important;
}

/* 캔버스 자체 1px 스캔 렌더링 엔진을 사용하므로 기존 CSS 오버레이는 숨김 */
.scan-beam-overlay {
  display: none !important;
}

/* 6. 완료 축하 배너/모달 (배경색/외곽선 삭제, 투명 미니멀 스타일, 완전 중앙 정렬) */
.unlock-celebration-card {
  margin: 0 auto;
  width: 100%;
  max-width: 760px;
  padding: 16px 8px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-align: center;
  animation: zoomFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* 포인트 획득 애니메이션 배지 (기존 포털 모션 스타일) */
.celebration-point-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.celebration-point-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
@keyframes pointsPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(-5deg); filter: brightness(1.35); }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.celebration-point-badge.points-popping {
  animation: pointsPop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.celebration-point-float {
  position: absolute;
  top: -24px;
  right: -10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffb703;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 183, 3, 0.6);
  padding: 2px 8px;
  border-radius: 10px;
  text-shadow: 0 0 10px rgba(255, 183, 3, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 100;
  animation: floatUpAndFade 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes floatUpAndFade {
  0% { opacity: 0; transform: translateY(6px) scale(0.7); }
  20% { opacity: 1; transform: translateY(-2px) scale(1.15); }
  75% { opacity: 1; transform: translateY(-16px) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(0.9); }
}

.flying-coin {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  font-size: 1.3rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 16px rgba(255, 183, 3, 0.7));
  will-change: transform, opacity;
  transform-origin: center center;
}
.point-coin-icon {
  font-size: 18px;
  line-height: 1;
}
.point-badge-label {
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.02em;
}
.point-badge-val {
  font-size: 16px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.04em;
}

.celebration-header {
  margin-bottom: 20px;
}
.celebration-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}
.celebration-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* 해금 관상 콘텐츠 목록 그리드 (심플하고 미니멀한 카드 스타일) */
.unlocked-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 28px 0 24px;
  text-align: left;
}
.unlocked-content-card {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.unlocked-content-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(30, 41, 59, 0.72);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.unlocked-content-card:hover .card-title {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.unlocked-content-card:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}
.card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* 해금 모션 애니메이션 */
@keyframes unlockCardGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    border-color: rgba(245, 158, 11, 0.8);
  }
  50% {
    box-shadow: 0 0 24px 6px rgba(245, 158, 11, 0.35);
    border-color: #fbbf24;
  }
  100% {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
  }
}
.unlocked-content-card.is-unlocking {
  animation: unlockCardGlow 1.2s ease-out forwards;
}

/* 하단 액션 버튼들 */
.celebration-footer-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-celebration-action {
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn-celebration-action.primary {
  background: linear-gradient(135deg, #fce08a 0%, #d4af37 100%);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}
.btn-celebration-action.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}
.btn-celebration-action.outline {
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.btn-celebration-action.outline:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
}


