@import url("./styles/legacy.css?v=main-20260608a");
@import url("./styles/tokens.css?v=main-20260608a");
@import url("./styles/layout.css?v=main-20260608a");
@import url("./styles/components.css?v=main-20260608a");
@import url("./styles/pages.css?v=main-20260608a");

/* Final responsive composition layer */
@media (max-width: 900px) {
  .service-shell[data-step="0"] .app-body {
    width: 100% !important;
    max-width: 100vw;
    padding: 18px 16px 72px !important;
  }

  .service-shell[data-step="0"] .onboarding-panel {
    display: block !important;
    width: 100%;
    max-width: none;
  }

  .service-shell[data-step="0"] .onboarding-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    align-items: start;
    padding: 12px 0 16px !important;
  }

  .service-shell[data-step="0"] .onboarding-copy {
    max-width: none;
  }

  .service-shell[data-step="0"] .onboarding-copy > span {
    margin-bottom: 22px;
    font-size: 12px;
    line-height: 1.2;
  }

  .service-shell[data-step="0"] .onboarding-copy h1 {
    max-width: 11em;
    font-size: clamp(32px, 7vw, 44px) !important;
    line-height: 1.07;
  }

  .service-shell[data-step="0"] .onboarding-copy p {
    max-width: 40em;
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.72;
  }

  .service-shell[data-step="0"] .onboarding-actions {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 14px 18px;
    margin-top: 26px;
  }

  .service-shell[data-step="0"] .onboarding-actions button {
    min-height: 48px;
    padding: 0 26px;
  }

  .service-shell[data-step="0"] .onboarding-actions span {
    max-width: 28em;
    font-size: 13px;
  }

  .service-shell[data-step="0"] .onboarding-visual {
    order: 0 !important;
    display: block !important;
    width: 100%;
    height: clamp(250px, 42vw, 330px) !important;
    min-height: 0 !important;
    margin: 0;
    overflow: hidden !important;
    border-radius: 12px;
  }

  .service-shell[data-step="0"] .onboarding-visual img {
    display: block;
    width: 100%;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center 58% !important;
  }

  .service-shell[data-step="0"] .onboarding-orbit {
    display: none !important;
  }

  .service-shell[data-step="0"] .onboarding-grid {
    grid-template-columns: 1fr !important;
    margin-top: 0;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow: hidden;
  }

  .service-shell[data-step="0"] .onboarding-grid article {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 4px 14px;
    min-height: auto;
    padding: 16px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line-soft);
  }

  .service-shell[data-step="0"] .onboarding-grid article:last-child {
    border-bottom: 0;
  }

  .service-shell[data-step="0"] .onboarding-grid span {
    grid-row: span 2;
    margin: 2px 0 0;
  }

  .service-shell[data-step="0"] .onboarding-grid strong {
    font-size: 17px;
  }

  .service-shell[data-step="0"] .onboarding-grid p {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.55;
  }
}

@media (max-width: 520px) {
  .service-shell[data-step="0"] .app-body {
    padding: 14px 12px 64px !important;
  }

  .service-shell[data-step="0"] .onboarding-copy h1 {
    max-width: 9.5em;
    font-size: clamp(30px, 9vw, 36px) !important;
  }

  .service-shell[data-step="0"] .onboarding-copy p {
    font-size: 14px;
  }

  .service-shell[data-step="0"] .onboarding-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .service-shell[data-step="0"] .onboarding-actions button {
    width: 100%;
  }

  .service-shell[data-step="0"] .onboarding-visual {
    height: 270px !important;
    border-radius: 10px;
  }

  .service-shell[data-step="0"] .onboarding-visual img {
    max-height: none !important;
  }
}

/* Final noir reference pass: make the pasted black/gold card tone the default product mood. */
body[data-theme="dark"] .service-shell {
  background:
    radial-gradient(circle at 50% -10%, rgba(198, 151, 54, 0.15), transparent 28%),
    radial-gradient(circle at 12% 16%, rgba(198, 151, 54, 0.08), transparent 24%),
    linear-gradient(180deg, #070604 0%, #0d0904 48%, #070604 100%) !important;
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .journey-bar,
body[data-theme="dark"] .step-actions {
  background: rgba(9, 7, 3, 0.92) !important;
  border-color: rgba(197, 143, 42, 0.24) !important;
}

body[data-theme="dark"] .brand span,
body[data-theme="dark"] .journey-bar article:not(.active) strong,
body[data-theme="dark"] .journey-bar article:not(.active) p {
  color: rgba(247, 236, 215, 0.54) !important;
}

body[data-theme="dark"] .brand strong::before,
body[data-theme="dark"] .profile-avatar {
  background: linear-gradient(145deg, #d6ad55, #6d4717) !important;
  color: #120d05 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 190, 0.24),
    0 12px 28px rgba(0, 0, 0, 0.28) !important;
}

body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .glass-menu > summary {
  background: rgba(19, 15, 8, 0.9) !important;
  border-color: rgba(198, 151, 54, 0.28) !important;
  color: #f5dfad !important;
}

body[data-theme="dark"] .journey-bar .active {
  background: rgba(198, 151, 54, 0.12) !important;
  border-color: rgba(198, 151, 54, 0.36) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .journey-bar .active span,
body[data-theme="dark"] .service-shell[data-step="1"] .section-title > span {
  background: linear-gradient(135deg, #d8af56, #8e5f1d) !important;
  color: #120d05 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy > span,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid span {
  color: #c99a45 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy h1,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid strong {
  color: #fff7e8 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy p,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-actions span,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid p {
  color: rgba(247, 236, 215, 0.68) !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-actions button {
  border: 1px solid rgba(225, 181, 82, 0.52) !important;
  background: linear-gradient(135deg, #d9af53 0%, #8f6320 100%) !important;
  color: #130d05 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34) !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-visual {
  border: 1px solid rgba(197, 143, 42, 0.2) !important;
  background: #100c05 !important;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36) !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid {
  border-color: rgba(197, 143, 42, 0.24) !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid article {
  border-color: rgba(197, 143, 42, 0.16) !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .profile-form,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-picker,
body[data-theme="dark"] .service-shell[data-step="1"] .country-picker,
body[data-theme="dark"] .service-shell[data-step="1"] .form-grid {
  background: linear-gradient(180deg, rgba(31, 27, 17, 0.96), rgba(16, 13, 7, 0.96)) !important;
  border-color: rgba(197, 143, 42, 0.22) !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options strong,
body[data-theme="dark"] .service-shell[data-step="1"] .birth-field {
  background: rgba(255, 223, 151, 0.035) !important;
  border-color: rgba(198, 151, 54, 0.2) !important;
  color: #fff4dc !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button.active,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button.active,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options input:checked + strong {
  background: linear-gradient(135deg, rgba(217, 175, 83, 0.28), rgba(103, 73, 22, 0.22)) !important;
  border-color: rgba(217, 175, 83, 0.68) !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button.active strong,
body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button.active span,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button.active strong,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button.active small,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options input:checked + strong {
  color: #fff4dc !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .mini-mascot {
  filter: sepia(0.22) saturate(0.82) brightness(0.92);
}

body[data-theme="dark"] .service-shell[data-step="1"] .primary-action,
body[data-theme="dark"] #step-next,
body[data-theme="dark"] [data-step-next],
body[data-theme="dark"] .drawer-actions button:last-child {
  background: linear-gradient(135deg, #d8af56, #8e5f1d) !important;
  border-color: rgba(230, 190, 92, 0.56) !important;
  color: #120d05 !important;
}

/* Professional flat pass: remove decorative gradients and reduce toy-like weight. */
body[data-theme="dark"] {
  background: #070604 !important;
  color: #dcc9a5 !important;
  font-weight: 450 !important;
}

body[data-theme="dark"] .service-shell {
  background: #070604 !important;
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .journey-bar,
body[data-theme="dark"] .step-actions,
body[data-theme="dark"] .service-shell[data-step="1"] .profile-form,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-picker,
body[data-theme="dark"] .service-shell[data-step="1"] .country-picker,
body[data-theme="dark"] .service-shell[data-step="1"] .form-grid,
body[data-theme="dark"] .selected-card,
body[data-theme="dark"] .metric-grid article,
body[data-theme="dark"] .evidence-panel,
body[data-theme="dark"] .premium-report,
body[data-theme="dark"] .retention-panel {
  background: #100d07 !important;
  background-image: none !important;
  border-color: rgba(180, 133, 44, 0.24) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .spirit-picker,
body[data-theme="dark"] .service-shell[data-step="1"] .country-picker,
body[data-theme="dark"] .service-shell[data-step="1"] .form-grid {
  background: #141008 !important;
}

body[data-theme="dark"] .brand strong,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy h1,
body[data-theme="dark"] .service-shell[data-step="1"] .section-title h2,
body[data-theme="dark"] .onboarding-grid strong {
  color: #f5ead2 !important;
  font-weight: 680 !important;
  letter-spacing: 0 !important;
}

body[data-theme="dark"] .brand strong {
  font-size: 22px !important;
}

body[data-theme="dark"] .brand span,
body[data-theme="dark"] .flow-context span,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy p,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-actions span,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid p,
body[data-theme="dark"] .service-shell[data-step="1"] .section-title p,
body[data-theme="dark"] .service-shell[data-step="1"] .birth-field small,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid small,
body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid span {
  color: rgba(220, 201, 165, 0.68) !important;
  font-weight: 430 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy > span,
body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid span {
  color: #b88a36 !important;
  font-weight: 620 !important;
}

body[data-theme="dark"] .brand strong::before,
body[data-theme="dark"] .profile-avatar,
body[data-theme="dark"] .journey-bar .active span,
body[data-theme="dark"] .service-shell[data-step="1"] .section-title > span {
  background: #b88a36 !important;
  background-image: none !important;
  color: #090704 !important;
  font-weight: 620 !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .glass-menu > summary,
body[data-theme="dark"] .glass-menu-panel {
  background: #120f08 !important;
  background-image: none !important;
  border-color: rgba(180, 133, 44, 0.3) !important;
  color: #ead7b3 !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .journey-bar .active {
  background: #151007 !important;
  background-image: none !important;
  border-color: rgba(184, 138, 54, 0.38) !important;
}

body[data-theme="dark"] .journey-bar article:not(.active) strong,
body[data-theme="dark"] .journey-bar article:not(.active) p {
  color: rgba(220, 201, 165, 0.4) !important;
  font-weight: 520 !important;
}

body[data-theme="dark"] .journey-bar strong,
body[data-theme="dark"] .journey-bar .active strong,
body[data-theme="dark"] .global-controls strong,
body[data-theme="dark"] .glass-menu-panel button {
  font-weight: 560 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-actions button,
body[data-theme="dark"] .service-shell[data-step="1"] .primary-action,
body[data-theme="dark"] #step-next,
body[data-theme="dark"] [data-step-next],
body[data-theme="dark"] .drawer-actions button:last-child {
  background: #c1974b !important;
  background-image: none !important;
  border: 1px solid #c1974b !important;
  color: #090704 !important;
  box-shadow: none !important;
  font-weight: 580 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-visual {
  background: #100d07 !important;
  background-image: none !important;
  border-color: rgba(180, 133, 44, 0.22) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid {
  border-color: rgba(180, 133, 44, 0.2) !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-grid article {
  border-color: rgba(180, 133, 44, 0.16) !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options strong,
body[data-theme="dark"] .service-shell[data-step="1"] .birth-field {
  background: #18140c !important;
  background-image: none !important;
  border-color: rgba(180, 133, 44, 0.24) !important;
  color: #ead7b3 !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button.active,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button.active,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options input:checked + strong {
  background: #231908 !important;
  background-image: none !important;
  border-color: #b88a36 !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button strong,
body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button.active strong,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button strong,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button.active strong,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options strong,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options input:checked + strong,
body[data-theme="dark"] .service-shell[data-step="1"] .birth-field input,
body[data-theme="dark"] .service-shell[data-step="1"] .birth-field .flatpickr-input + input {
  color: #f0dfbd !important;
  font-weight: 560 !important;
}

body[data-theme="dark"] .service-shell[data-step="0"] .onboarding-copy h1 {
  font-size: clamp(36px, 3.6vw, 48px) !important;
  line-height: 1.12 !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .section-title h2 {
  font-size: clamp(28px, 3vw, 40px) !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid .mini-mascot {
  transform: scale(0.82);
  opacity: 0.82;
}

body[data-theme="dark"] button,
body[data-theme="dark"] .glass-menu > summary,
body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options strong {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

body[data-theme="dark"] button:hover,
body[data-theme="dark"] .glass-menu > summary:hover,
body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button:hover,
body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button:hover,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options strong:hover {
  border-color: rgba(193, 151, 75, 0.68) !important;
  transform: translateY(-1px);
}

/* Intent controls: one clean surface, no nested mint block. */
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options label {
  padding: 0 !important;
  overflow: hidden;
  background: #141008 !important;
  background-image: none !important;
  border-color: rgba(180, 133, 44, 0.24) !important;
  color: #dccaab !important;
  box-shadow: none !important;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

body[data-theme="dark"] .service-shell[data-step="1"] .intent-options label:has(input:checked) {
  background: #231908 !important;
  background-image: none !important;
  border-color: #b88a36 !important;
  color: #f0dfbd !important;
}

body[data-theme="dark"] .service-shell[data-step="1"] .intent-options label:hover {
  border-color: rgba(193, 151, 75, 0.68) !important;
  transform: translateY(-1px);
}

body[data-theme="dark"] .service-shell[data-step="1"] .intent-options label strong,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options label:has(input:checked) strong,
body[data-theme="dark"] .service-shell[data-step="1"] .intent-options input:checked + strong {
  width: 100%;
  min-height: 46px;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  color: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root) {
  animation-name: jibun-step-out;
}

::view-transition-new(root) {
  animation-name: jibun-step-in;
}

.onboarding-panel,
.profile-panel,
.analysis-panel,
.map-workspace,
.report-drawer {
  view-transition-name: step-surface;
}

@keyframes jibun-step-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes jibun-step-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.996);
  }
}

.service-shell[data-step="0"] .onboarding-panel,
.service-shell[data-step="1"] .profile-panel,
.service-shell[data-step="2"] .analysis-panel,
.service-shell[data-step="3"] .map-workspace,
.service-shell[data-step="4"] .report-drawer {
  animation: jibun-panel-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes jibun-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  body[data-theme="dark"] button,
  body[data-theme="dark"] .glass-menu > summary,
  body[data-theme="dark"] .service-shell[data-step="1"] .country-chip-grid button,
  body[data-theme="dark"] .service-shell[data-step="1"] .spirit-grid button,
  body[data-theme="dark"] .service-shell[data-step="1"] .intent-options label,
  body[data-theme="dark"] .service-shell[data-step="1"] .intent-options strong {
    transition: none;
  }

  .service-shell[data-step="0"] .onboarding-panel,
  .service-shell[data-step="1"] .profile-panel,
  .service-shell[data-step="2"] .analysis-panel,
  .service-shell[data-step="3"] .map-workspace,
  .service-shell[data-step="4"] .report-drawer {
    animation: none;
  }
}

/* Internal service alignment: flat landing-to-report noir system. */
body[data-theme="dark"] {
  --jibun-bg: #070604;
  --jibun-surface: #100d07;
  --jibun-panel: #141008;
  --jibun-card: #18140c;
  --jibun-card-active: #231908;
  --jibun-card-soft: #1d1810;
  --jibun-line: rgba(180, 133, 44, 0.24);
  --jibun-line-strong: #b88a36;
  --jibun-text: #f0dfbd;
  --jibun-heading: #fff3d6;
  --jibun-muted: rgba(220, 201, 165, 0.68);
  --jibun-faint: rgba(220, 201, 165, 0.42);
  --jibun-gold: #c1974b;
  --jibun-warning: #d48c5f;
}

body[data-theme="dark"] .analysis-panel,
body[data-theme="dark"] .map-workspace,
body[data-theme="dark"] .report-drawer,
body[data-theme="dark"] .saju-summary,
body[data-theme="dark"] .map-canvas,
body[data-theme="dark"] .selected-card,
body[data-theme="dark"] .metric-grid article,
body[data-theme="dark"] .evidence-panel,
body[data-theme="dark"] .premium-report,
body[data-theme="dark"] .retention-panel,
body[data-theme="dark"] .advisor-party,
body[data-theme="dark"] .insight-list p {
  background: var(--jibun-surface) !important;
  background-image: none !important;
  border-color: var(--jibun-line) !important;
  box-shadow: none !important;
  color: var(--jibun-text) !important;
}

body[data-theme="dark"] .day-master-card,
body[data-theme="dark"] .pillar-detail,
body[data-theme="dark"] .element-focus,
body[data-theme="dark"] .saju-panel,
body[data-theme="dark"] .lucky-card,
body[data-theme="dark"] .map-help,
body[data-theme="dark"] .map-stats,
body[data-theme="dark"] .map-legend,
body[data-theme="dark"] .compass,
body[data-theme="dark"] .premium-head,
body[data-theme="dark"] .premium-unlock-strip,
body[data-theme="dark"] .premium-grid article,
body[data-theme="dark"] .evidence-grid article,
body[data-theme="dark"] .advisor-list article,
body[data-theme="dark"] .score-row .ring,
body[data-theme="dark"] .formula-list,
body[data-theme="dark"] .mini-list article,
body[data-theme="dark"] .mission-grid article,
body[data-theme="dark"] .prompt-stack p {
  background: var(--jibun-card) !important;
  background-image: none !important;
  border-color: var(--jibun-line) !important;
  box-shadow: none !important;
  color: var(--jibun-text) !important;
}

body[data-theme="dark"] .section-title h2,
body[data-theme="dark"] .section-title strong,
body[data-theme="dark"] .map-header h2,
body[data-theme="dark"] .report-flow-title h2,
body[data-theme="dark"] .day-master-card strong,
body[data-theme="dark"] .pillar-detail strong,
body[data-theme="dark"] .saju-panel strong,
body[data-theme="dark"] .selected-card h3,
body[data-theme="dark"] .selected-card strong,
body[data-theme="dark"] .metric-grid strong,
body[data-theme="dark"] .evidence-head strong,
body[data-theme="dark"] .premium-head strong,
body[data-theme="dark"] .retention-panel strong,
body[data-theme="dark"] .advisor-list strong,
body[data-theme="dark"] .map-stats strong,
body[data-theme="dark"] .candidate-rail strong {
  color: var(--jibun-heading) !important;
  font-weight: 620 !important;
  letter-spacing: 0 !important;
}

body[data-theme="dark"] .section-title p,
body[data-theme="dark"] .map-header p,
body[data-theme="dark"] .report-flow-title p,
body[data-theme="dark"] .day-master-card p,
body[data-theme="dark"] .pillar-detail p,
body[data-theme="dark"] .element-focus p,
body[data-theme="dark"] .saju-panel p,
body[data-theme="dark"] .mini-list p,
body[data-theme="dark"] .mission-grid p,
body[data-theme="dark"] .prompt-stack p,
body[data-theme="dark"] .selected-card p,
body[data-theme="dark"] .metric-grid span,
body[data-theme="dark"] .evidence-grid p,
body[data-theme="dark"] .premium-grid p,
body[data-theme="dark"] .retention-panel p,
body[data-theme="dark"] .insight-list p,
body[data-theme="dark"] .advisor-copy,
body[data-theme="dark"] .advisor-list p,
body[data-theme="dark"] .map-stats span,
body[data-theme="dark"] .map-legend span,
body[data-theme="dark"] .candidate-rail span,
body[data-theme="dark"] .disclaimer {
  color: var(--jibun-muted) !important;
  font-weight: 450 !important;
}

body[data-theme="dark"] .pillar-grid button,
body[data-theme="dark"] .element-bars button,
body[data-theme="dark"] .saju-tabs button,
body[data-theme="dark"] .region-filter button,
body[data-theme="dark"] .candidate-rail button,
body[data-theme="dark"] .drawer-actions button,
body[data-theme="dark"] #save-candidate,
body[data-theme="dark"] #compare-candidate {
  background: var(--jibun-card) !important;
  background-image: none !important;
  border-color: var(--jibun-line) !important;
  color: var(--jibun-text) !important;
  box-shadow: none !important;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

body[data-theme="dark"] .pillar-grid button:hover,
body[data-theme="dark"] .element-bars button:hover,
body[data-theme="dark"] .saju-tabs button:hover,
body[data-theme="dark"] .region-filter button:hover,
body[data-theme="dark"] .candidate-rail button:hover,
body[data-theme="dark"] .drawer-actions button:hover,
body[data-theme="dark"] #save-candidate:hover,
body[data-theme="dark"] #compare-candidate:hover {
  border-color: rgba(193, 151, 75, 0.64) !important;
  transform: translateY(-1px);
}

body[data-theme="dark"] .pillar-grid button.active,
body[data-theme="dark"] .element-bars button.active,
body[data-theme="dark"] .saju-tabs button.active,
body[data-theme="dark"] .region-filter button.active,
body[data-theme="dark"] .candidate-rail button.active,
body[data-theme="dark"] .candidate-rail button[aria-selected="true"] {
  background: var(--jibun-card-active) !important;
  background-image: none !important;
  border-color: var(--jibun-line-strong) !important;
  color: var(--jibun-heading) !important;
  box-shadow: inset 0 0 0 1px rgba(184, 138, 54, 0.16) !important;
}

body[data-theme="dark"] .fortune-spin,
body[data-theme="dark"] .premium-head button,
body[data-theme="dark"] .drawer-actions button:last-child,
body[data-theme="dark"] .premium-unlock-strip button {
  background: var(--jibun-gold) !important;
  background-image: none !important;
  border-color: var(--jibun-gold) !important;
  color: #090704 !important;
  box-shadow: none !important;
  font-weight: 620 !important;
}

body[data-theme="dark"] .element-bars i,
body[data-theme="dark"] .score-row .ring,
body[data-theme="dark"] .ring {
  background-color: rgba(193, 151, 75, 0.16) !important;
  background-image: none !important;
  border-color: var(--jibun-line) !important;
}

body[data-theme="dark"] .element-bars i::before,
body[data-theme="dark"] .element-bars i::after,
body[data-theme="dark"] .ring::before,
body[data-theme="dark"] .ring::after {
  background-color: var(--jibun-gold) !important;
  background-image: none !important;
}

body[data-theme="dark"] .map-marker {
  background: var(--jibun-card) !important;
  background-image: none !important;
  border: 1px solid var(--jibun-line) !important;
  color: var(--jibun-text) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26) !important;
}

body[data-theme="dark"] .map-marker.selected {
  background: var(--jibun-gold) !important;
  background-image: none !important;
  border-color: var(--jibun-gold) !important;
  color: #090704 !important;
}

body[data-theme="dark"] .map-marker.caution {
  border-color: rgba(212, 140, 95, 0.68) !important;
  color: #e6b592 !important;
}

body[data-theme="dark"] .region-filter button.locked,
body[data-theme="dark"] .candidate-unlock-card,
body[data-theme="dark"] .locked {
  background: rgba(20, 16, 8, 0.72) !important;
  background-image: none !important;
  border-color: rgba(180, 133, 44, 0.16) !important;
  color: var(--jibun-faint) !important;
}

body[data-theme="dark"] .leaflet-container {
  background: #0b0905 !important;
  filter: saturate(0.72) brightness(0.78) contrast(0.96);
}

body[data-theme="dark"] .leaflet-control-zoom a,
body[data-theme="dark"] .leaflet-popup-content-wrapper,
body[data-theme="dark"] .leaflet-popup-tip {
  background: var(--jibun-surface) !important;
  color: var(--jibun-text) !important;
  border-color: var(--jibun-line) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .source-badge,
body[data-theme="dark"] #source-badge,
body[data-theme="dark"] .tag,
body[data-theme="dark"] .pill {
  background: var(--jibun-card-active) !important;
  background-image: none !important;
  border-color: var(--jibun-line) !important;
  color: var(--jibun-gold) !important;
  box-shadow: none !important;
}

body[data-theme="dark"] .analysis-panel *,
body[data-theme="dark"] .map-workspace *,
body[data-theme="dark"] .report-drawer * {
  text-shadow: none !important;
}

body[data-theme="dark"] .analysis-panel,
body[data-theme="dark"] .map-workspace,
body[data-theme="dark"] .report-drawer {
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

body[data-theme="dark"] .analysis-panel :focus-visible,
body[data-theme="dark"] .map-workspace :focus-visible,
body[data-theme="dark"] .report-drawer :focus-visible {
  outline: 2px solid rgba(193, 151, 75, 0.72);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  body[data-theme="dark"] .analysis-panel,
  body[data-theme="dark"] .map-workspace,
  body[data-theme="dark"] .report-drawer {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  body[data-theme="dark"] .pillar-grid button,
  body[data-theme="dark"] .element-bars button,
  body[data-theme="dark"] .region-filter button,
  body[data-theme="dark"] .candidate-rail button,
  body[data-theme="dark"] .metric-grid article {
    min-height: 0 !important;
  }
}

/* === Auth slot (topbar) ==================================================== */
.auth-slot {
  display: inline-flex;
  align-items: center;
}
.auth-login,
.auth-logout {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--jibun-line, rgba(180, 133, 44, 0.24));
  background: transparent;
  color: var(--jibun-text, #f0dfbd);
  letter-spacing: -0.01em;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.auth-login {
  padding: 7px 16px;
  font-weight: 650;
}
.auth-login:hover {
  border-color: var(--jibun-line-strong, #b88a36);
  color: var(--jibun-heading, #fff3d6);
}
.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* hidden 속성이 .auth-user 의 display:inline-flex 에 specificity 로 밀려 무효화되던 버그 fix —
   비로그인 시 로그아웃 버튼이 안 숨겨지던 문제(로그인+로그아웃 동시 노출) 해소. */
.auth-user[hidden] {
  display: none;
}
.auth-user-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--jibun-muted, rgba(220, 201, 165, 0.68));
}
.auth-logout {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.auth-logout:hover {
  border-color: var(--jibun-line-strong, #b88a36);
  color: var(--jibun-heading, #fff3d6);
}

/* === Premium lock card (paywall teaser) =================================== */
.premium-lock-head {
  align-items: flex-start;
}
.premium-lock-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1c1402;
  background: var(--jibun-gold, #c1974b);
  white-space: nowrap;
  transition: filter 0.18s ease, transform 0.12s ease;
}
.premium-lock-cta:hover {
  filter: brightness(1.06);
}
.premium-lock-cta:active {
  transform: translateY(1px);
}
.premium-grid-locked .premium-locked-card {
  position: relative;
}
.premium-locked-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--jibun-faint, rgba(220, 201, 165, 0.42));
}
.premium-locked-hint i {
  width: 13px;
  height: 13px;
}

/* === My reports overlay ==================================================== */
.reports-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 6, 4, 0.62);
  backdrop-filter: blur(6px);
}
.reports-overlay[hidden] {
  display: none;
}
.reports-overlay-card {
  width: min(440px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--jibun-line, rgba(180, 133, 44, 0.24));
  background: var(--jibun-surface, #100d07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.reports-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--jibun-line, rgba(180, 133, 44, 0.24));
}
.reports-overlay-head strong {
  font-size: 1rem;
  color: var(--jibun-heading, #fff3d6);
  letter-spacing: -0.02em;
}
.reports-overlay-close {
  cursor: pointer;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  color: var(--jibun-muted, rgba(220, 201, 165, 0.68));
  padding: 4px 8px;
  border-radius: 8px;
}
.reports-overlay-close:hover {
  color: var(--jibun-heading, #fff3d6);
}
.reports-overlay-body {
  padding: 14px 16px 20px;
  overflow-y: auto;
}
.reports-empty {
  margin: 18px 6px;
  color: var(--jibun-muted, rgba(220, 201, 165, 0.68));
  font-size: 0.88rem;
}
.reports-login-cta {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-weight: 650;
  color: #1c1402;
  background: var(--jibun-gold, #c1974b);
}
.reports-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reports-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--jibun-line, rgba(180, 133, 44, 0.24));
  background: var(--jibun-card, #18140c);
  padding: 12px 14px;
  font: inherit;
  color: var(--jibun-text, #f0dfbd);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.reports-item:hover {
  border-color: var(--jibun-line-strong, #b88a36);
  background: var(--jibun-card-active, #231908);
}
.reports-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.reports-item-main strong {
  font-size: 0.96rem;
  color: var(--jibun-heading, #fff3d6);
}
.reports-item-main small {
  font-size: 0.74rem;
  color: var(--jibun-faint, rgba(220, 201, 165, 0.42));
}
.reports-item-status {
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--jibun-line, rgba(180, 133, 44, 0.24));
  color: var(--jibun-muted, rgba(220, 201, 165, 0.68));
}
.reports-item-status.unlocked {
  color: #1c1402;
  background: var(--jibun-gold, #c1974b);
  border-color: transparent;
}
