#ui-datepicker-div { width: 17em !important; height: auto !important; font-size: 14px; line-height: normal; }
#ui-datepicker-div table { width: 100% !important; table-layout: auto !important; }
#ui-datepicker-div th,
#ui-datepicker-div td { height: auto !important; line-height: normal !important; border: 0 !important; }
#ui-datepicker-div td { padding: 1px !important; }
#ui-datepicker-div td a,
#ui-datepicker-div td span { display: block !important; padding: .2em !important; text-align: right; }


/* ==========================================================================
   예보종합 > 중기예보 > 기상전망 및 분포도 (forecast/overall/mid-term main.html)

   ========================================================================== */

/* 소제목: 첫 소제목(기상전망)은 지역 선택 바로 아래라 시안 기본 위 여백(6rem)을 줄임 */
.cmp-midterm .tab-menu-cont > .nr__subtit-wrap:first-child,
.cmp-midterm .medm-region + #stnId1 + .medm-tit-row { margin-top: 32px; }
.cmp-midterm .nr__subtit-wrap .nr__subtit-tit { margin: 0; padding: 0; line-height: 1.3; }

/* 기상전망 제목 + 첫 번째 발표시각(.mid-tm-box) 한 줄 (.medm-tit-row)
   발표시각은 data-zoom-area 밖이라 원래 글자 크기 유지, 원래 스타일은 그대로 두고 위치 관련 속성만 덮어씀 */
.cmp-midterm .medm-tit-row { display: flex; align-items: center; gap: 8px 16px; }
.cmp-midterm .medm-tit-row > .nr__subtit-wrap { width: auto; margin-top: 0 !important; }
.cmp-midterm .medm-tit-row > .medm-tm-inline { position: static !important; top: auto; right: auto; bottom: auto; left: auto; float: none; margin: 0 0 0 auto !important; }
@media (max-width: 1023px) {
	/* 좁은 화면: 제목 아래 왼쪽 */
	.cmp-midterm .medm-tit-row { flex-direction: column; align-items: flex-start; }
	.cmp-midterm .medm-tit-row > .medm-tm-inline { margin-left: 0 !important; }
}

/* 지도 아래 안내 박스 (시안 .mid-term--content-gap .nr__box 여백) */
.cmp-midterm .medm-map-guide { margin-top: 2rem; }

/* 2021 개황 박스 글자 (zoom 밖, 주변 시안 본문과 같은 16px) */
.cmp-midterm .mid-tm-box,
.cmp-midterm .mid-tm-box .lbl,
.cmp-midterm .mid-tm-box .txt { font-size: 16px; line-height: 1.5; }
.cmp-midterm .box-summary .text-box .tit { font-size: 18px; line-height: 1.5; }
.cmp-midterm .box-summary .text-box .txt,
.cmp-midterm .box-summary .text-box .txt li { font-size: 16px; line-height: 1.6; }

/* ----------------------------------------------------------
   지역 선택 (.medm-region > #tab-buttons1) - 기상전망 위, 한 줄 표시
   data-zoom-area="1" 안이라 rem 으로 지정
   상단 서브탭(roundbox-small: 남색 테두리 사각 버튼, 선택 시 남색 채움)과 구별되도록
   · 아주 연한 회색 패널 안 알약형 칩, 선택 시 연파랑 배경 + 파랑 테두리 + 체크 표시
   · 칩이 패널 너비를 나눠 채우고, 그래도 넘치는 좁은 화면에서는 가로 스크롤
   ---------------------------------------------------------- */
.cmp-midterm .medm-region { margin-top: 2.4rem; padding: 1rem 1.2rem; border: 1px solid #E0E6EF; border-radius: .8rem; background-color: #FBFCFD; }
.cmp-midterm #tab-buttons1 { margin: 0; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; }
.cmp-midterm #tab-buttons1::-webkit-scrollbar { display: none; }
.cmp-midterm #tab-buttons1 .nr__label { flex: 1 0 auto; min-height: 3.2rem; padding: 0 .9rem; gap: .3rem; border-color: #D4D4D4; color: #535353; letter-spacing: -0.04em; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.cmp-midterm #tab-buttons1 .nr__label:hover { border-color: #006FE8; color: #006FE8; }
.cmp-midterm #tab-buttons1 :checked + .nr__label { border-color: #006FE8; background-color: #E8F1FD; color: #006FE8; font-weight: 700; }
.cmp-midterm #tab-buttons1 :checked + .nr__label::before { content: ''; display: block; flex-shrink: 0; width: 1.2rem; height: 1.2rem; background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center / contain; }
@media (max-width: 1023px) {
	.cmp-midterm .medm-region { padding: 1rem; }
	.cmp-midterm #tab-buttons1 .nr__label { flex: 0 0 auto; }
}

/* 분포도 범례: sub.css .nr__box-point / .nr__midterm-legend 디자인을 px 로 옮김 (sub.css 비의존) */
.medm-legend-box { position: relative; margin-top: 16px; padding: 20px; border: 2px solid #E0E6EF; background-color: #fff; font-size: 16px; font-weight: 500; }
.medm-legend-box::before,
.medm-legend-box::after { content: ''; display: block; position: absolute; width: 30px; height: 30px; z-index: 1; pointer-events: none; }
.medm-legend-box::before { top: -2px; left: -2px; border-top: 2px solid #006FE8; border-left: 2px solid #006FE8; }
.medm-legend-box::after { bottom: -2px; right: -2px; border-bottom: 2px solid #006FE8; border-right: 2px solid #006FE8; }
.medm-legend-tit { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.medm-legend { display: none; width: 100%; margin: 0; padding: 0; list-style: none; }
.medm-legend.is-active { display: block; }
ul.medm-legend.is-active { display: flex; gap: 12px; }

/* 강수가능성: 강수형태 x 강수가능성 표 (색은 kmap.bb.js styles.medm.RPOS_PTY 와 동일) */
.medm-legend-rpos .medm-legend-scroll { padding: 0; }
.medm-legend-rpos-table { width: 100%; min-width: 560px; border-collapse: collapse; table-layout: fixed; }
.medm-legend-rpos-table th,
.medm-legend-rpos-table td { height: 34px; border: 1px solid #D4D4D4; text-align: center; font-size: 14px; font-weight: 700; color: #000; line-height: 1.2; }
.medm-legend-rpos-table thead th { background-color: #F3F3F3; }
.medm-legend-rpos-table thead th span { display: block; font-size: 12px; font-weight: 500; color: #424242; }
.medm-legend-rpos-table tbody th { width: 16%; background-color: #F3F3F3; }
.medm-legend-rpos-table td:nth-of-type(1) { background-color: #FFFFFF; }
.medm-legend-rpos-table tr.rain   td:nth-of-type(2) { background-color: #91C9F7; }
.medm-legend-rpos-table tr.rain   td:nth-of-type(3) { background-color: #4297DE; }
.medm-legend-rpos-table tr.rain   td:nth-of-type(4) { background-color: #006EE7; }
.medm-legend-rpos-table tr.snow   td:nth-of-type(2) { background-color: #E8D8FA; }
.medm-legend-rpos-table tr.snow   td:nth-of-type(3) { background-color: #C094F1; }
.medm-legend-rpos-table tr.snow   td:nth-of-type(4) { background-color: #8B3CE7; }
.medm-legend-rpos-table tr.sleet  td:nth-of-type(2) { background-color: #FAF0CC; }
.medm-legend-rpos-table tr.sleet  td:nth-of-type(3) { background-color: #F1D673; }
.medm-legend-rpos-table tr.sleet  td:nth-of-type(4) { background-color: #E7B200; }
.medm-legend-rpos-table tr.shower td:nth-of-type(2) { background-color: #FDE4CC; }
.medm-legend-rpos-table tr.shower td:nth-of-type(3) { background-color: #FAB573; }
.medm-legend-rpos-table tr.shower td:nth-of-type(4) { background-color: #F87700; }

/* 하늘상태 */
.medm-legend-sky li { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 70px; font-size: 14px; font-weight: 700; line-height: 1.2; color: #000; }
.medm-legend-sky li:nth-child(1) { background-color: #E3E3E3; }
.medm-legend-sky li:nth-child(2) { background-color: #6FA2BD; color: #fff; }
.medm-legend-sky li:nth-child(3) { background-color: #3E7A9A; color: #fff; }

/* 기온 / 최고·최저기온 막대 */
.medm-legend-scroll { overflow-x: auto; padding: 0 12px; }
.medm-legend-bar { display: flex; width: 100%; min-width: 600px; padding-bottom: 30px; }
.medm-legend-bar > span { position: relative; flex: 1; height: 20px; }
.medm-legend-bar > span > span { position: absolute; top: calc(100% + 4px); left: 0; transform: translateX(-50%); font-size: 14px; font-weight: 700; white-space: nowrap; }

@media (max-width: 768px) {
	ul.medm-legend.is-active { flex-wrap: wrap; gap: 8px; }
	.medm-legend-sky li { flex: 1 1 calc(25% - 6px); min-height: 48px; }
}

/* 지도 위 kmap 범례: 숨김 해제, 글자 크기만 조정 (다른 페이지 #legend 에 영향 없도록 플레이어 범위로 한정)
   크기를 바꾸려면 아래 font-size 값만 수정 */
#medm-player #legend { font-size: 13px; line-height: 1.3; }
#medm-player #legend * { font-size: inherit; line-height: inherit; }
@media (max-width: 768px) {
	#medm-player #legend { font-size: 11px; }
}

/* ==========================================================
   분포도 플레이어 (image-player.js ImagePlayer + 디자인 시안)
   - 동작 훅(form, .image-player-slide, data-role 버튼, .movi-line, .movi-bar-wrap, tm_display)은
     image-player.js 가 찾는 이름 그대로 두고, 생김새만 #medm-player 범위에서 시안대로 지정
   - 시안(sub.css nr__midterm-*) rem 값을 px 로 옮김 (data-zoom-area 밖이라 px 그대로 표시)
   ========================================================== */
#medm-player { margin-top: 16px; padding: 20px; background-color: #EEF2F7; box-sizing: border-box; }
#medm-player *, #medm-player *::before, #medm-player *::after { box-sizing: border-box; }

/* 지도: ImagePlayer 가 .image-player-slide 안에 .kmap-app > #kmap 을 만들고
   높이를 너비와 같게(인라인) 잡으므로 시안 높이로 덮어씀 */
#medm-player .image-player-slide { position: relative; width: 100%; height: 650px; min-height: 0; margin: 0; padding: 0; background-color: #6a8292; overflow: hidden; }
#medm-player .image-player-slide .kmap-app { position: relative; width: 100%; height: 100%; }
#medm-player #kmap { width: 100% !important; height: 100% !important; }

/* 컨트롤 바 */
.medm-player-control { display: flex; flex-direction: column; gap: 18px; margin: 20px 0 10px; }
.medm-player-time { display: flex; align-items: center; gap: 8px; }
.medm-player-time-label { flex-shrink: 0; font-size: 16px; font-weight: 700; color: #000; }
.medm-player-time-value { min-width: 250px; padding: 8px 16px; border: 0; border-radius: 6px; background-color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05); font-size: 16px; font-weight: 500; color: #000; }
.medm-player-timeline { display: flex; align-items: center; gap: 20px; min-height: 80px; padding: 12px 24px; border-radius: 8px; background-color: #E0E6EF; }
.medm-player-btns { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
.medm-player-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: #1e293b; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
.medm-player-btn:hover { opacity: .75; }
.medm-player-btn:active { transform: scale(.92); }
.medm-player-btn--prev, .medm-player-btn--next { width: 28px; height: 28px; }
.medm-player-btn--play { width: 36px; height: 36px; border: 2px solid #1e293b; border-radius: 50%; }
.medm-player-btn--play .icon-pause { display: none; }
.medm-player-btn--play.stop-slide .icon-play { display: none; }
.medm-player-btn--play.stop-slide .icon-pause { display: block; }

/* 트랙: .movi-line = jQuery UI 슬라이더(손잡이 span 이 말풍선), .movi-bar-wrap = 진행 바 */
.medm-player-track { position: relative; flex: 1; display: flex; align-items: center; height: 32px; }
#medm-player .movi-line { position: relative; width: 100%; height: 6px; margin: 0; padding: 0; border: 0; border-radius: 1px; background: #fff; }
#medm-player .movi-bar-wrap { position: absolute; left: 0; top: 50%; width: 0; height: 6px; margin-top: -3px; border-radius: 1px; background: #1677ff; pointer-events: none; z-index: 1; }
#medm-player .movi-line > .ui-slider-handle,
#medm-player .movi-line > span { position: absolute; top: -36px; width: auto; height: auto; margin-left: 0; padding: 5px 8px; transform: translateX(-50%); border: 0; border-radius: 4px; background: #006FE8 none; box-shadow: 0 2px 4px rgba(22,119,255,.25); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: grab; outline: none; z-index: 2; }
#medm-player .movi-line > span::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 5px 5px 0 5px; border-style: solid; border-color: #006FE8 transparent transparent transparent; }
#medm-player .movi-line > span:focus-visible { outline: 2px solid #1e293b; outline-offset: 2px; }

/* 시각별 눈금 (시안 nr__midterm-tick): 기본 회색, 지난 시각·현재 시각은 파랑 */
.medm-player-ticks { position: absolute; left: 0; right: 0; top: 50%; height: 5px; pointer-events: none; z-index: 1; }
.medm-player-tick { position: absolute; top: 0; width: 2px; height: 5px; margin-left: -1px; background-color: #CCD2DB; transition: background-color .15s ease-out; }
.medm-player-tick.is-passed,
.medm-player-tick.is-active { background-color: #006FE8; }

/* 이동 애니메이션 (시안 sub.css 와 동일 0.15s ease-out): 진행 바 너비, 말풍선 위치, 눈금 색
   슬라이더를 끄는 중(jQuery UI 손잡이 .ui-state-active)에는 손가락을 바로 따라가도록 애니메이션 해제 */
#medm-player .movi-bar-wrap { transition: width .15s ease-out; }
#medm-player .movi-line > span { transition: left .15s ease-out; }
#medm-player .movi-line > span.ui-state-active { transition: none; cursor: grabbing; }
#medm-player .movi-line:has(> span.ui-state-active) + .movi-bar-wrap { transition: none; }
@media (prefers-reduced-motion: reduce) {
	#medm-player .movi-bar-wrap,
	#medm-player .movi-line > span,
	.medm-player-tick { transition: none; }
}

@media (max-width: 1024px) {
	#medm-player .image-player-slide { height: 440px; }
}
@media (max-width: 768px) {
	#medm-player .image-player-slide { height: 320px; }
	.medm-player-time-value { min-width: 0; flex: 1; }
	.medm-player-timeline { flex-direction: column; align-items: stretch; gap: 32px; padding-top: 24px; }
	.medm-player-btns { justify-content: center; }
}

/* ------------------------------------------------------------------
   분포도 지도 클릭 → 인근 지점 팝업 (app-weather-mid-term-map.js .medm-near-pop, ol.Overlay)
   위 화살표 + 남색 테두리 목록
   ------------------------------------------------------------------ */
.medm-near-pop { position: relative; min-width: 180px; max-width: 260px; background-color: #fff; border: 2px solid #19213D; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); font-size: 13px; line-height: 1.3; }
.medm-near-pop::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 9px solid #19213D; }
.medm-near-pop-close { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; z-index: 1; }
.medm-near-pop-close::before,
.medm-near-pop-close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; background-color: #6D758F; }
.medm-near-pop-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.medm-near-pop-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.medm-near-pop-list { margin: 0; padding: 0; list-style: none; border-radius: 4px; overflow: hidden; }
.medm-near-pop-list > li + li { border-top: 1px solid #F0F0F5; }
.medm-near-pop-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; padding: 8px 14px; border: 0; background-color: #fff; color: #19213D; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; cursor: pointer; }
.medm-near-pop-item:hover,
.medm-near-pop-item:focus-visible { background-color: #EEF5FF; color: #006FE8; }
.medm-near-pop-item.is-location { padding-right: 34px; }
.medm-near-pop-item.is-location .medm-near-pop-name::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background-color: #006FE8; vertical-align: middle; }
.medm-near-pop-name { overflow: hidden; text-overflow: ellipsis; }
.medm-near-pop-dist { flex: none; font-size: 11px; font-weight: 500; color: #6D758F; }
