html,
body {
  background: #030c14;
}
.photo-header {
  display: none;
}
.photo-workspace {
  padding: 12px 0;
  max-width: none;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
}
.photo-intro h1 {
  font-size: 25px;
}
[data-tab="tabStorage"],
#tabStorage,
.side-storage {
  display: none !important;
}
.gwansang-standalone-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px auto;
  max-width: 1400px;
}
.gwansang-standalone-nav a,
.gwansang-standalone-nav button,
.gwansang-history button {
  border: 1px solid #334155;
  border-radius: 9px;
  background: #162335;
  color: #e2e8f0;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
}
.gwansang-standalone-nav button[aria-pressed="true"] {
  border-color: #22d3ee;
  color: #a5f3fc;
}
/* 사진 등록 화면에서는 오관, 십이궁 등 다른 탭메뉴 숨김 */
.gwansang-standalone-nav.photos-only-mode button:not([data-gwansang-view="photos"]) {
  display: none !important;
}

/* 사진 등록 단계별 레이아웃 (첫 화면: 입력 메인, 다른 콘텐츠 숨김 / 분석 단계: 분석 화면 메인) */
.photo-workspace.is-step-upload {
  display: block !important;
  max-width: 840px !important;
  margin: 0 auto !important;
  padding: 24px 16px !important;
}
.photo-workspace.is-step-upload .photo-inputs {
  width: 100% !important;
  max-width: 100% !important;
}
.photo-workspace.is-step-upload .photo-inputs-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  margin-bottom: 20px !important;
}
.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 !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 24px 16px !important;
}
.photo-workspace.is-step-analysis .photo-inputs {
  display: none !important;
}
.photo-workspace.is-step-analysis .photo-review {
  display: block !important;
  width: 100% !important;
}
.scan-beam-overlay {
  display: none !important;
}
.gwansang-history {
  padding: 24px;
  border: 1px solid #263247;
  border-radius: 16px;
  background: #101827;
}
.gwansang-history h2 {
  margin: 0 0 10px;
  font-size: 20px;
}
.gwansang-history p {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 14px;
}
.gwansang-history-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.gwansang-history-list button {
  text-align: left;
  display: grid;
  gap: 8px;
}
.gwansang-history-list small {
  color: #94a3b8;
}
.gwansang-history article {
  border-top: 1px solid #334155;
  margin-top: 20px;
  padding-top: 20px;
}
.gwansang-history article h3 {
  color: #67e8f9;
  font-size: 16px;
}
.gwansang-history dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gwansang-history dd {
  margin: 4px 0;
  color: #a5f3fc;
}
.gwansang-menu-note {
  color: #94a3b8;
  font-size: 13px;
  padding: 0 8px;
}
body[data-embedded="true"] .gwansang-standalone-nav {
  display: none;
}
html.is-embedded,
body.is-embedded,
body[data-embedded="true"] {
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 0 !important;
}
html.is-embedded::-webkit-scrollbar,
body.is-embedded::-webkit-scrollbar,
body[data-embedded="true"]::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
@media (max-width: 760px) {
  .photo-workspace {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }
  .gwansang-history {
    padding: 16px;
  }
}


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

/* 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;
}

/* 6. 완료 축하 배너/모달 */
.unlock-celebration-card {
  margin: 20px auto;
  max-width: 860px;
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.92) 100%);
  border: 2px solid rgba(245, 158, 11, 0.45);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 158, 11, 0.15);
  text-align: center;
  animation: zoomFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.celebration-header {
  margin-bottom: 24px;
}
.celebration-unlock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  margin-bottom: 14px;
}
.unlock-icon-pop {
  font-size: 16px;
  display: inline-block;
  animation: unlockKeyPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.unlock-badge-text {
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.02em;
}
.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(260px, 1fr));
  gap: 16px;
  margin: 28px 0 24px;
  text-align: left;
}
.unlocked-content-card {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.94));
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 18px;
  padding: 20px 18px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.unlocked-content-card:hover {
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(245, 158, 11, 0.22);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
}
.unlocked-content-card:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.card-status-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
}
.card-icon-badge {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 12px;
}
.card-cta {
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}
.unlocked-content-card:hover .card-cta {
  transform: translateX(3px);
}

/* 해금 모션 애니메이션 */
@keyframes unlockCardGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8);
    border-color: rgba(245, 158, 11, 0.9);
  }
  50% {
    box-shadow: 0 0 32px 8px rgba(245, 158, 11, 0.45);
    border-color: #fbbf24;
  }
  100% {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
    border-color: rgba(245, 158, 11, 0.28);
  }
}
@keyframes unlockKeyPop {
  0% { transform: scale(0.5) rotate(-25deg); opacity: 0; }
  50% { transform: scale(1.4) rotate(12deg); }
  75% { transform: scale(0.9) rotate(-6deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.unlocked-content-card.is-unlocking {
  animation: unlockCardGlow 1.4s ease-out forwards;
}
.unlocked-content-card.is-unlocking .card-lock-icon {
  display: inline-block;
  animation: unlockKeyPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 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);
}
.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);
}

/* 탭메뉴 삭제 요구사항 */
.photo-tabs,
.gwansang-standalone-nav,
.gwansang-home-tabs {
  display: none !important;
}
