/* 투자한판 공통 다크 테마 - mypage.html은 이 파일을 불러오지 않습니다. */
body.hanpan-dark {
  --bg:#07111f;
  --card:#0d1a2b;
  --panel:#0d1a2b;
  --panel2:#10243a;
  --text:#eef5ff;
  --muted:#9ab0c7;
  --line:#203955;
  --navy:#132a41;
  --navy2:#1d3a56;
  --blue:#76c7ff;
  --green:#64d6aa;
  --orange:#f5b864;
  --purple:#a899ff;
  --shadow:0 18px 50px rgba(0,0,0,.22);
  --ih-bg:#07111f;
  --ih-card:#0d1a2b;
  --ih-text:#eef5ff;
  --ih-muted:#9ab0c7;
  --ih-line:#203955;
  --ih-navy:#132a41;
  --ih-blue:#76c7ff;
  --ih-purple:#a899ff;
  --ih-orange:#f5b864;
  --ih-green:#64d6aa;
  --ih-shadow:0 18px 50px rgba(0,0,0,.22);
  margin:0;
  color:var(--text);
  background:linear-gradient(180deg,#07111f 0%,#091522 38%,#06101b 100%);
  color-scheme:dark;
}

body.hanpan-dark, body.hanpan-dark button, body.hanpan-dark input, body.hanpan-dark select, body.hanpan-dark textarea {
  font-family:Pretendard,"Noto Sans KR",Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}

body.hanpan-dark a {
  color:inherit
}

body.hanpan-dark h1,body.hanpan-dark h2,body.hanpan-dark h3,body.hanpan-dark h4,body.hanpan-dark strong {
  color:var(--text)
}

body.hanpan-dark p,body.hanpan-dark .lead {
  color:var(--muted)
}

body.hanpan-dark ::selection {
  background:rgba(118,199,255,.24);
  color:#fff
}

/* ==========================================================
   공통 헤더 - 라이트 헤더를 다크로 강제 통일
========================================================== */
body.hanpan-dark .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #07111f !important;
  border-bottom: 1px solid #203955 !important;
}

body.hanpan-dark .site-header .header-inner {
  min-height: 72px;
}

body.hanpan-dark .site-header .brand {
  color: #eef5ff !important;
}

body.hanpan-dark .site-header .brand-mark {
  background: #050d18 !important;
  border: 1px solid #203955;
}

body.hanpan-dark .site-header .main-nav {
  background: transparent;
}

body.hanpan-dark .site-header .main-nav a {
  color: #b8cce0 !important;
}

body.hanpan-dark .site-header .main-nav a:hover, body.hanpan-dark .site-header .main-nav a.active {
  color: #76c7ff !important;
}

body.hanpan-dark .site-header .menu-btn {
  color: #eef5ff !important;
}

@media (max-width: 900px) {
  body.hanpan-dark .site-header .main-nav {
    background: #091827 !important;
    border-bottom: 1px solid #203955 !important;
  }
}

body.hanpan-dark .hero-art {
  background:linear-gradient(145deg,#10243a,#081522);
  box-shadow:var(--shadow)
}

body.hanpan-dark .hero-art:before {
  background:rgba(118,199,255,.10)
}

body.hanpan-dark .hero-art:after {
  background:rgba(100,214,170,.08)
}

body.hanpan-dark .thought-banner, body.hanpan-dark .category-card, body.hanpan-dark .panel, body.hanpan-dark .article, body.hanpan-dark .history-chart-wrap, body.hanpan-dark .history-mini-event {
  background:#0d1a2b;
  border-color:var(--line);
  box-shadow:0 10px 30px rgba(0,0,0,.16)
}

body.hanpan-dark .thought-banner strong {
  background:#132a41;
  color:#fff
}

body.hanpan-dark .tag,body.hanpan-dark .method-tags a,body.hanpan-dark .term-tags a {
  background:#10243a;
  color:#b8cce0
}

body.hanpan-dark .method-tags a:hover,body.hanpan-dark .term-tags a:hover {
  background:#16314e;
  color:#fff
}

body.hanpan-dark .list a,body.hanpan-dark .list button {
  background:#0a1828;
  color:#dce9f5;
  border-color:transparent
}

body.hanpan-dark .list a:hover,body.hanpan-dark .list button:hover,body.hanpan-dark .list .selected {
  background:#102944;
  border-color:#315979
}

body.hanpan-dark .search input,body.hanpan-dark input,body.hanpan-dark select,body.hanpan-dark textarea {
  background:#081625;
  color:#eef5ff;
  border-color:#2a4d70
}

body.hanpan-dark input::placeholder,body.hanpan-dark textarea::placeholder {
  color:#6f8297
}

body.hanpan-dark .search button {
  background:#1d3a56;
  color:#fff
}

body.hanpan-dark .quote {
  background:#0a1d30;
  color:#e7f1fb;
  border-left-color:#76c7ff
}

body.hanpan-dark .chart {
  background:linear-gradient(to top,#081522,#0d1a2b);
  border-color:var(--line)
}

body.hanpan-dark .timeline-step:before {
  background:#29435f
}

body.hanpan-dark .timeline-step:after {
  border-color:#07111f
}

body.hanpan-dark .index-tab,body.hanpan-dark .history-filter button {
  background:#0a1828;
  color:#b8cce0;
  border-color:var(--line)
}

body.hanpan-dark .index-tab:hover,body.hanpan-dark .index-tab.active,body.hanpan-dark .history-filter button.active {
  background:#1d3a56;
  border-color:#4d8dff;
  color:#fff
}

body.hanpan-dark .chart-title span {
  background:#10243a;
  color:#9fb8cc
}

body.hanpan-dark .stat-card {
  background:#0a1828;
  border-color:var(--line)
}

body.hanpan-dark .stat-card dl>div {
  border-top-color:#1d324a
}

body.hanpan-dark .history-overview, body.hanpan-dark .history-card, body.hanpan-dark .history-event-card {
  background:#0d1a2b!important;
  border-color:var(--line)!important;
  color:var(--text)
}

body.hanpan-dark .history-expand {
  background:#091827!important;
  border-color:var(--line)!important
}

body.hanpan-dark .history-no-index {
  background:#081827!important;
  border-color:#294866!important
}

body.hanpan-dark .history-index-row {
  border-color:#203955!important
}

body.hanpan-dark .index-name {
  color:#b8cce0!important
}

body.hanpan-dark .footer {
  background:#050d18;
  color:#c7d6e5;
  border-top:1px solid #172b41
}

/* 메인 */
body.hanpan-dark .invest-home {
  background:transparent!important;
  color:var(--ih-text)!important
}

body.hanpan-dark .guide-card, body.hanpan-dark .hub-card, body.hanpan-dark .quote-card, body.hanpan-dark .economic-list, body.hanpan-dark .support-card, body.hanpan-dark .guide-thoughts {
  background:#0d1a2b!important;
  border-color:#203955!important;
  color:#eef5ff!important;
  box-shadow:0 10px 30px rgba(0,0,0,.16)!important
}

body.hanpan-dark .hub-card:hover,body.hanpan-dark .guide-card:hover,body.hanpan-dark .quote-card:hover {
  border-color:#315979!important;
  box-shadow:0 16px 38px rgba(0,0,0,.24)!important
}

body.hanpan-dark .refresh-btn,body.hanpan-dark .support-btn {
  background:#10243a!important;
  color:#dceaf6!important;
  border-color:#294866!important;
  box-shadow:none!important
}

body.hanpan-dark .refresh-btn:hover,body.hanpan-dark .support-btn:hover {
  background:#16314e!important;
  border-color:#4f83aa!important;
  color:#fff!important
}

body.hanpan-dark .quote-code,body.hanpan-dark .hub-card .tag,body.hanpan-dark .coming-pill {
  background:#10243a!important;
  color:#9fb8cc!important
}

body.hanpan-dark .is-coming {
  background:#091827!important
}

body.hanpan-dark .notice-line {
  background:#081827!important;
  border-color:#203955!important;
  color:#91aac0!important
}

body.hanpan-dark .economic-row {
  border-bottom-color:#1d324a!important
}

body.hanpan-dark .economic-row:hover {
  background:#10243a!important
}

body.hanpan-dark .economic-date {
  border-right-color:#203955!important
}

body.hanpan-dark .economic-copy>strong {
  color:#e7f1fb!important
}

body.hanpan-dark .guide-thoughts p {
  color:#9ab0c7!important
}

body.hanpan-dark .guide-thoughts a,body.hanpan-dark .hub-card .more {
  color:#76c7ff!important
}

body.hanpan-dark .support-card {
  background:linear-gradient(135deg,#0d1a2b 0%,#10243a 100%)!important
}

body.hanpan-dark .support-card::after {
  background:rgba(118,199,255,.08)!important
}

/* 캘린더 */
body.hanpan-dark .calendar-page {
  background:transparent;
  color:var(--text)
}

body.hanpan-dark .calendar-main, body.hanpan-dark .calendar-mobile-list, body.hanpan-dark .calendar-detail {
  background:#0d1a2b!important;
  border-color:#203955!important;
  box-shadow:0 12px 34px rgba(0,0,0,.2)!important
}

body.hanpan-dark .calendar-weekdays {
  background:#091827!important;
  border-color:#203955!important
}

body.hanpan-dark .calendar-weekdays span {
  color:#8fa7bf!important
}

body.hanpan-dark .calendar-day {
  background:#0d1a2b!important;
  border-color:#1d324a!important
}

body.hanpan-dark .calendar-day.is-empty {
  background:#091522!important
}

body.hanpan-dark .calendar-day.has-event:hover {
  background:#10243a!important
}

body.hanpan-dark .calendar-day.is-selected {
  background:#102944!important;
  box-shadow:inset 0 0 0 2px #4d8dff!important
}

body.hanpan-dark .day-number {
  color:#dce9f5!important
}

body.hanpan-dark .calendar-event.compact {
  background:#0a1828!important
}

body.hanpan-dark .calendar-event.compact:hover {
  background:#102944!important
}

body.hanpan-dark .event-title {
  color:#e7f1fb!important
}

body.hanpan-dark .event-time,body.hanpan-dark .event-meta em,body.hanpan-dark .calendar-note {
  color:#8fa7bf!important
}

body.hanpan-dark .detail-head {
  background:rgba(13,26,43,.96)!important;
  border-color:#203955!important
}

body.hanpan-dark .detail-close {
  background:#10243a!important;
  color:#dce9f5!important;
  border-color:#294866!important
}

body.hanpan-dark .detail-event {
  border-color:#1d324a!important
}

body.hanpan-dark .detail-category {
  background:#10243a!important;
  color:#9fb8cc!important
}

body.hanpan-dark .detail-event h3 {
  color:#eef5ff!important
}

body.hanpan-dark .mobile-event-row {
  border-color:#1d324a!important
}

body.hanpan-dark .mobile-event-row.is-selected {
  background:#102944!important
}

body.hanpan-dark .calendar-back {
  display:none!important
}

/* 투자방법/용어/역사/생각 */
body.hanpan-dark .guide-tabs a,body.hanpan-dark .guide-tabs button {
  border-color:#294866;
  color:#b8cce0;
  background:#0a1828
}

body.hanpan-dark .guide-tabs a:hover,body.hanpan-dark .guide-tabs button:hover {
  border-color:#4f83aa;
  color:#fff
}

body.hanpan-dark .guide-tabs a.active,body.hanpan-dark .guide-tabs button.active {
  border-color:#76c7ff;
  color:#9fdcff;
  background:rgba(118,199,255,.10)
}

body.hanpan-dark .method-disclaimer {
  background:#081827!important;
  border:1px solid #203955;
  color:#91aac0!important
}

body.hanpan-dark .term-cat-badge {
  background:rgba(118,199,255,.10)!important;
  color:#9fdcff!important
}

body.hanpan-dark .story-toggle {
  background:#10243a!important;
  color:#dce9f5!important;
  border-color:#294866!important
}

body.hanpan-dark .story-toggle:hover {
  background:#16314e!important
}

body.hanpan-dark .story-item p {
  color:#b8cce0!important
}

/* 표/팝업/일반 컨트롤 */
body.hanpan-dark table {
  color:var(--text)
}

body.hanpan-dark th {
  color:#91a8bf
}

body.hanpan-dark td {
  border-color:rgba(255,255,255,.07)
}

body.hanpan-dark button {
  color:inherit
}

body.hanpan-dark hr {
  border-color:var(--line)
}

@media(max-width:900px) {
  body.hanpan-dark .main-nav {
    background:#091827;
    border-bottom-color:#203955
  }
}

/* common.css 역사 페이지의 오래된 라이트 하드코딩까지 전부 흡수 */
body.hanpan-dark .focus-badge {
  background:rgba(118,199,255,.10)!important;
  color:#9fdcff!important
}

body.hanpan-dark .chart-grid {
  stroke:#203955!important
}

body.hanpan-dark .chart-axis,body.hanpan-dark .chart-x,body.hanpan-dark .phase-label,body.hanpan-dark .baseline-label {
  fill:#8fa7bf!important
}

body.hanpan-dark .phase-0 {
  fill:#091827!important
}

.hanpan-dark .phase-1 {
  fill:#1a1b1a!important
}

.hanpan-dark .phase-2 {
  fill:#1d1518!important
}

.hanpan-dark .phase-3 {
  fill:#0d211d!important
}

body.hanpan-dark .chart-legend {
  color:#9ab0c7!important
}

body.hanpan-dark .century-ruler {
  color:#7f97af!important
}

body.hanpan-dark .long-timeline {
  border-bottom-color:#29435f!important
}

body.hanpan-dark .history-event {
  border-color:#07111f!important;
  box-shadow:0 0 0 2px #31506e!important
}

body.hanpan-dark .history-event span {
  background:#10243a!important;
  border-color:#294866!important;
  color:#e7f1fb!important;
  box-shadow:0 6px 16px rgba(0,0,0,.24)!important
}

body.hanpan-dark .event-year {
  color:#29435f!important
}

body.hanpan-dark .mind-box {
  background:#0a1d30!important;
  border-color:#294866!important;
  color:#dce9f5!important
}

body.hanpan-dark .mind-box p {
  color:#c7d6e5!important
}

body.hanpan-dark .actual-chart {
  background:#0d1a2b!important;
  border-color:#203955!important;
  box-shadow:0 8px 24px rgba(0,0,0,.16)!important
}

body.hanpan-dark .axis-line {
  stroke:#29435f!important
}

body.hanpan-dark .point-value {
  fill:#9ab0c7!important
}

body.hanpan-dark .no-chart,body.hanpan-dark .empty-period {
  background:#081827!important;
  border-color:#294866!important
}

body.hanpan-dark .event-bubble {
  background:#0d1a2b!important;
  border-color:#203955!important;
  color:#e7f1fb!important;
  box-shadow:0 8px 18px rgba(0,0,0,.18)!important
}

body.hanpan-dark .period-event.selected .event-bubble {
  background:#102944!important;
  border-color:#4d8dff!important
}

body.hanpan-dark .event-dot {
  background:#07111f!important;
  box-shadow:0 0 0 4px #07111f!important
}

body.hanpan-dark .history-summary-card {
  background:#0d1a2b!important;
  border-color:#203955!important;
  box-shadow:0 10px 30px rgba(0,0,0,.16)!important
}

body.hanpan-dark .history-summary-card.open {
  border-color:#315979!important;
  box-shadow:0 16px 38px rgba(0,0,0,.24)!important
}

body.hanpan-dark .history-card-date {
  background:rgba(118,199,255,.10)!important;
  color:#9fdcff!important
}

body.hanpan-dark .history-index-list {
  background:#091827!important;
  border-color:#203955!important
}

body.hanpan-dark .history-expanded-inner {
  background:#091827!important
}

body.hanpan-dark .history-mini-event:hover,body.hanpan-dark .history-mini-event:focus-visible {
  background:#102944!important;
  border-color:#315979!important
}

/* 공통 콘텐츠 본문 가독성 */
body.hanpan-dark .article p,body.hanpan-dark .article li {
  color:#c7d6e5
}

body.hanpan-dark .article code {
  background:#081827;
  color:#9fdcff
}

body.hanpan-dark .section-head p,body.hanpan-dark .history-head p,body.hanpan-dark .event-summary,body.hanpan-dark .chart-section-head p {
  color:#9ab0c7!important
}
