world-map.scss 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. // ─────────────────────────────────────────────────────────────
  2. // 메인 세계지도 (WorldMarketMap) — 주요국 증시지수 핀 + 지역 탭 + 데이터 그리드
  3. // d3-geo geoNaturalEarth1 투영 · 국가별 topojson feature 렌더.
  4. // 색은 토큰/반투명 리터럴만(라이트·다크 양립). 등락색 --price-up/down/flat(상승 적/하락 청).
  5. // ─────────────────────────────────────────────────────────────
  6. .world-map {
  7. // 지도 전용 반투명 톤 — 패널 배경 위에 얹혀 양 테마에서 자연스럽게 블렌딩
  8. --az-map-ocean-1: rgba(46, 110, 190, 0.18);
  9. --az-map-ocean-2: rgba(46, 110, 190, 0.03);
  10. --az-map-land: rgba(140, 158, 180, 0.34);
  11. --az-map-land-edge: rgba(150, 168, 190, 0.55);
  12. margin-bottom: var(--sp-6);
  13. padding: var(--sp-4);
  14. background: var(--bg-elevated);
  15. border: 1px solid var(--border-default);
  16. border-radius: var(--radius);
  17. &__head {
  18. display: flex;
  19. align-items: center;
  20. justify-content: space-between;
  21. flex-wrap: wrap;
  22. gap: var(--sp-3);
  23. margin-bottom: var(--sp-3);
  24. }
  25. &__title {
  26. font-size: var(--fs-lg);
  27. font-weight: 700;
  28. color: var(--text-primary);
  29. }
  30. &__meta {
  31. display: flex;
  32. align-items: center;
  33. gap: var(--sp-4);
  34. font-size: var(--fs-xs);
  35. color: var(--text-muted);
  36. }
  37. &__legend {
  38. display: inline-flex;
  39. align-items: center;
  40. gap: var(--sp-2);
  41. }
  42. &__dot {
  43. display: inline-block;
  44. width: 8px;
  45. height: 8px;
  46. border-radius: 50%;
  47. &--up {
  48. background: var(--price-up);
  49. margin-left: var(--sp-2);
  50. }
  51. &--down {
  52. background: var(--price-down);
  53. margin-left: var(--sp-3);
  54. }
  55. }
  56. &__asof {
  57. font-variant-numeric: tabular-nums;
  58. }
  59. // ── 레이아웃: 지도(넓게) + 지수 패널(우측). 좁은 화면은 세로 스택 ──
  60. &__body {
  61. display: grid;
  62. grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  63. gap: var(--sp-5);
  64. align-items: start;
  65. }
  66. @media (max-width: 960px) {
  67. &__body {
  68. grid-template-columns: 1fr;
  69. }
  70. }
  71. // ── 지도 무대 ──
  72. &__stage {
  73. position: relative;
  74. width: 100%;
  75. aspect-ratio: 1000 / 500;
  76. min-width: 0;
  77. }
  78. &__svg {
  79. width: 100%;
  80. height: 100%;
  81. display: block;
  82. }
  83. // 대륙 (국가별 topojson feature path)
  84. &__land path {
  85. fill: var(--az-map-land);
  86. stroke: var(--az-map-land-edge);
  87. stroke-width: 0.4;
  88. stroke-linejoin: round;
  89. vector-effect: non-scaling-stroke;
  90. }
  91. // 핀 — 그룹 color 로 방향색 상속, dot/pulse 는 currentColor
  92. &__pin {
  93. cursor: pointer;
  94. outline: none;
  95. &--up {
  96. color: var(--price-up);
  97. }
  98. &--down {
  99. color: var(--price-down);
  100. }
  101. &--flat {
  102. color: var(--price-flat);
  103. }
  104. }
  105. &__pin-dot {
  106. fill: currentColor;
  107. filter: drop-shadow(0 0 3px currentColor);
  108. transition: r 0.15s ease;
  109. }
  110. &__pin-core {
  111. fill: rgba(255, 255, 255, 0.92);
  112. pointer-events: none;
  113. }
  114. // 확산 링 (상승/하락 핀)
  115. &__pulse {
  116. fill: currentColor;
  117. opacity: 0.5;
  118. transform-box: fill-box;
  119. transform-origin: center;
  120. animation: wm-pulse 2.4s ease-out infinite;
  121. pointer-events: none;
  122. }
  123. &__pin.is-active &__pin-dot {
  124. stroke: rgba(255, 255, 255, 0.9);
  125. stroke-width: 1.5;
  126. }
  127. // 툴팁
  128. &__tip {
  129. position: absolute;
  130. transform: translate(-50%, -128%);
  131. min-width: 132px;
  132. padding: var(--sp-3) var(--sp-4);
  133. background: var(--bg-page);
  134. border: 1px solid var(--border-strong);
  135. border-radius: var(--radius);
  136. box-shadow: 0 var(--sp-2) var(--sp-4) var(--shadow-color);
  137. pointer-events: none;
  138. z-index: 2;
  139. }
  140. &__tip-head {
  141. display: flex;
  142. align-items: baseline;
  143. gap: var(--sp-2);
  144. margin-bottom: var(--sp-2);
  145. }
  146. &__tip-country {
  147. font-size: var(--fs-xs);
  148. font-weight: 700;
  149. color: var(--text-primary);
  150. }
  151. &__tip-name {
  152. font-size: var(--fs-2xs);
  153. color: var(--text-muted);
  154. white-space: nowrap;
  155. }
  156. &__tip-close {
  157. font-size: var(--fs-lg);
  158. font-weight: 700;
  159. font-variant-numeric: tabular-nums;
  160. color: var(--text-primary);
  161. }
  162. &__tip-change {
  163. display: flex;
  164. align-items: baseline;
  165. justify-content: space-between;
  166. gap: var(--sp-3);
  167. margin-top: var(--sp-1);
  168. font-size: var(--fs-sm);
  169. font-weight: 600;
  170. font-variant-numeric: tabular-nums;
  171. &--up {
  172. color: var(--price-up);
  173. }
  174. &--down {
  175. color: var(--price-down);
  176. }
  177. &--flat {
  178. color: var(--price-flat);
  179. }
  180. }
  181. &__tip-exch {
  182. font-size: var(--fs-2xs);
  183. font-weight: 400;
  184. color: var(--text-muted);
  185. }
  186. // ── 지수 패널 ──
  187. &__panel {
  188. display: flex;
  189. flex-direction: column;
  190. min-width: 0;
  191. }
  192. // 지역 탭 (언더라인 스타일)
  193. &__tabs {
  194. display: flex;
  195. flex-wrap: wrap;
  196. gap: var(--sp-2);
  197. border-bottom: 1px solid var(--border-default);
  198. margin-bottom: var(--sp-2);
  199. }
  200. &__tab {
  201. padding: var(--sp-3) var(--sp-4);
  202. background: transparent;
  203. border: none;
  204. border-bottom: 2px solid transparent;
  205. margin-bottom: -1px;
  206. font-size: var(--fs-sm);
  207. font-weight: 600;
  208. color: var(--text-muted);
  209. cursor: pointer;
  210. transition: color 0.12s ease, border-color 0.12s ease;
  211. &:hover {
  212. color: var(--text-secondary);
  213. }
  214. &.is-active {
  215. color: var(--text-primary);
  216. border-bottom-color: var(--text-link);
  217. }
  218. }
  219. // 데이터 그리드
  220. &__grid-wrap {
  221. overflow-x: auto;
  222. }
  223. &__grid {
  224. width: 100%;
  225. border-collapse: collapse;
  226. font-size: var(--fs-sm);
  227. font-variant-numeric: tabular-nums;
  228. th {
  229. padding: var(--sp-3);
  230. text-align: right;
  231. font-size: var(--fs-xs);
  232. font-weight: 600;
  233. color: var(--text-muted);
  234. border-bottom: 1px solid var(--border-default);
  235. white-space: nowrap;
  236. }
  237. td {
  238. padding: var(--sp-3);
  239. border-bottom: 1px solid var(--border-light);
  240. white-space: nowrap;
  241. }
  242. }
  243. &__row {
  244. cursor: default;
  245. transition: background 0.1s ease;
  246. &:hover,
  247. &.is-active {
  248. background: var(--bg-subtle-hover);
  249. }
  250. }
  251. &__c-name {
  252. text-align: left;
  253. }
  254. &__c-num {
  255. text-align: right;
  256. }
  257. &__c-time {
  258. text-align: right;
  259. font-size: var(--fs-xs);
  260. color: var(--text-muted);
  261. }
  262. &__c-chart {
  263. text-align: center;
  264. width: 1%;
  265. }
  266. &__c-close {
  267. color: var(--text-primary);
  268. font-weight: 600;
  269. }
  270. &__c-up {
  271. color: var(--price-up);
  272. }
  273. &__c-down {
  274. color: var(--price-down);
  275. }
  276. &__c-flat {
  277. color: var(--price-flat);
  278. }
  279. &__row-country {
  280. font-weight: 700;
  281. color: var(--text-primary);
  282. }
  283. &__row-name {
  284. display: block;
  285. font-size: var(--fs-2xs);
  286. color: var(--text-muted);
  287. }
  288. &__chart-btn {
  289. display: inline-flex;
  290. align-items: center;
  291. justify-content: center;
  292. padding: var(--sp-2);
  293. background: transparent;
  294. border: 1px solid var(--border-default);
  295. border-radius: var(--radius);
  296. color: var(--text-muted);
  297. cursor: pointer;
  298. transition: color 0.12s ease, border-color 0.12s ease;
  299. &:hover {
  300. color: var(--text-link);
  301. border-color: var(--text-link);
  302. }
  303. }
  304. &__empty {
  305. padding: var(--sp-6);
  306. text-align: center;
  307. font-size: var(--fs-sm);
  308. color: var(--text-muted);
  309. }
  310. // ── 차트 모달 (TradingView 드릴다운) ──
  311. &__modal {
  312. position: fixed;
  313. inset: 0;
  314. z-index: 1000;
  315. display: flex;
  316. align-items: center;
  317. justify-content: center;
  318. padding: var(--sp-5);
  319. background: rgba(0, 0, 0, 0.55);
  320. }
  321. &__modal-panel {
  322. display: flex;
  323. flex-direction: column;
  324. width: min(960px, 96vw);
  325. height: min(620px, 88vh);
  326. background: var(--bg-page);
  327. border: 1px solid var(--border-strong);
  328. border-radius: var(--radius);
  329. overflow: hidden;
  330. }
  331. &__modal-head {
  332. display: flex;
  333. align-items: center;
  334. justify-content: space-between;
  335. gap: var(--sp-3);
  336. padding: var(--sp-3) var(--sp-4);
  337. border-bottom: 1px solid var(--border-default);
  338. }
  339. &__modal-title {
  340. font-size: var(--fs-base);
  341. font-weight: 700;
  342. color: var(--text-primary);
  343. }
  344. &__modal-close {
  345. display: inline-flex;
  346. align-items: center;
  347. justify-content: center;
  348. width: 28px;
  349. height: 28px;
  350. background: transparent;
  351. border: none;
  352. border-radius: var(--radius);
  353. font-size: var(--fs-2xl);
  354. line-height: 1;
  355. color: var(--text-muted);
  356. cursor: pointer;
  357. &:hover {
  358. color: var(--text-primary);
  359. background: var(--bg-subtle-hover);
  360. }
  361. }
  362. &__modal-body {
  363. flex: 1;
  364. min-height: 0;
  365. }
  366. &__modal-note {
  367. padding: var(--sp-2) var(--sp-4);
  368. font-size: var(--fs-2xs);
  369. color: var(--text-muted);
  370. text-align: right;
  371. }
  372. }
  373. @keyframes wm-pulse {
  374. 0% {
  375. transform: scale(1);
  376. opacity: 0.5;
  377. }
  378. 100% {
  379. transform: scale(2.6);
  380. opacity: 0;
  381. }
  382. }
  383. @media (prefers-reduced-motion: reduce) {
  384. .world-map__pulse {
  385. animation: none;
  386. opacity: 0;
  387. }
  388. }