@charset "UTF-8";

/*
 * [PJA-26-048] 충주 도시관제 라이브 대시보드 (/mobile/live.do)
 * 시안2-2 (1920×1080 실측) 기반. 스테이지를 뷰포트에 맞춰 scale 한다.
 */

:root {
    --lv-bg: #ECEEF1;
    --lv-text-strong: #555555;
    --lv-text-gray: #707070;
    --lv-text-light: #B4B4B4;
    --lv-point-blue: #81A3FF;
    --lv-point-red: #FF8181;
    --lv-card: #FFFFFF;
    --lv-line: #E2E2E2;
    --lv-radius-card: 16px;
    --lv-radius-tile: 12px;
}

@font-face {
    font-family: "Pretendard";
    src: url(./font/Pretendard-Light.subset.woff);
    font-weight: 300;
}

@font-face {
    font-family: "Pretendard";
    src: url(./font/Pretendard-Regular.subset.woff);
    font-weight: 400;
}

@font-face {
    font-family: "Pretendard";
    src: url(./font/Pretendard-Medium.subset.woff);
    font-weight: 500;
}

@font-face {
    font-family: "Pretendard";
    src: url(./font/Pretendard-SemiBold.subset.woff);
    font-weight: 600;
}

@font-face {
    font-family: "Pretendard";
    src: url(./font/Pretendard-Bold.subset.woff);
    font-weight: 700;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.lv_body {
    margin: 0;
    overflow: hidden;
    background: #d6d9de;
    font-family: "Pretendard", "SUIT Variable", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    color: var(--lv-text-strong);
}

body.lv_body > .ol-ctx-menu-container {
    display: none !important;
}

.lv_viewport {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--lv-bg);
}

/* 1920×1080 고정 캔버스 (JS에서 scale 적용) */
.lv_stage {
    position: absolute;
    left: 0;
    top: 0;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    background: var(--lv-bg);
    transform: scale(1);
    transform-origin: left top;
}

.lv_stage button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.lv_stage ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lv_stage p,
.lv_stage h1 {
    margin: 0;
}

/* ===== 헤더 ===== */
.lv_stage .top {
    position: absolute;
    left: 42px;
    top: 21px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lv_stage .top img {
    display: block;
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.lv_stage .top h1 {
    margin-top: 4px;
    font-size: 34px;
    font-family: PretendardSemiBold, "Pretendard", sans-serif;
    font-weight: 600;
    letter-spacing: -0.57px;
    color: #2B3C98;
}

/* ===== 섹션 라벨 ===== */
.lv_stage .sec_label.right {
    position: absolute;
    right: 46px;
    top: 45px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lv_stage .sec_label.right .cctvImg {
    width: 27px;
    height: 20px;
}

.lv_stage .sec_label.right .cctvTitle {
    font-family: PretendardSemiBold, "Pretendard", sans-serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--lv-text-strong);
}

/* ===== 좌측: CCTV 위치 지도 ===== */
.lv_stage .map_card {
    position: absolute;
    left: 42px;
    top: 88px;
    width: 644px;
    height: 632px;
    overflow: hidden;
    border-radius: var(--lv-radius-card);
    background: #e3e6ea;
    border: 2px solid #C4C8D0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lv_stage .map_card .lv_map {
    width: 100%;
    height: 100%;
}

.lv_stage .map_type {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(85, 85, 85, 0.28);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 10;
}

.lv_stage .map_type button {
    min-width: 54px;
    height: 32px;
    padding: 0 10px;
    color: var(--lv-text-gray);
    font-size: 15px;
    font-weight: 500;
}

.lv_stage .map_type button + button {
    border-left: 1px solid rgba(85, 85, 85, 0.18);
}

.lv_stage .map_type button.active {
    background: var(--lv-point-blue);
    color: #fff;
}

/* ===== 좌측: 기상예보 ===== */
.lv_stage .weather_head {
    position: absolute;
    left: 42px;
    top: 735px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 644px;
    height: 32px;
    padding-bottom: 2px;
}

.lv_stage .weather_head .sec_title {
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lv_stage .weather_head .sec_title .weatherImg {
    width: 24px;
    height: 24px;
}

.lv_stage .weather_head .sec_title .cctvTitle {
    font-family: PretendardSemiBold, "Pretendard", sans-serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--lv-text-strong);
    line-height: 1;
}

/* 기상 데이터가 오늘 것이 아닐 때 노출하는 기준 시각 배지.
   .weather_head는 flex(space-between)이므로 margin-right:auto로 제목 옆에 붙이고
   날짜는 오른쪽 끝에 그대로 남긴다. (2026-07-27 정연재) */
.lv_stage .weather_head .weather_stamp {
    margin-left: 10px;
    margin-right: auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .05);
    font-size: 15px;
    letter-spacing: -0.2px;
    color: var(--lv-text-gray);
    white-space: nowrap;
}

/* flex item이 되면 UA 스타일시트의 [hidden]이 덮일 수 있어 명시한다. */
.lv_stage .weather_head .weather_stamp[hidden] {
    display: none;
}

.lv_stage .weather_head .date {
    margin: 0 8px 1px 0;
    font-size: 16px;
    letter-spacing: 0.2px;
    color: var(--lv-text-gray);
    line-height: 1;
}

.lv_stage .weather_head .date b {
    margin-left: 6px;
    font-weight: 600;
    color: var(--lv-text-strong);
}

.lv_stage .weather_card {
    position: absolute;
    left: 42px;
    top: 777px;
    width: 644px;
    height: 268px;
    background: var(--lv-card);
    border-radius: var(--lv-radius-card);
}

/* 현재 날씨 줄 — 카드 원점 기준 절대좌표 */
.lv_stage .now_icon {
    position: absolute;
    left: 32px;
    top: 22px;
    display: block;
    width: 128px;
    height: 93px;
    object-fit: contain;
    object-position: center;
}

.lv_stage .now_temp {
    position: absolute;
    left: 163px;
    top: 21px;
    text-align: left;
}

.lv_stage .now_temp .deg {
    position: relative;
    display: inline-block;
    font-size: 84px;
    line-height: 66px;
    font-weight: 600;
    letter-spacing: -4px;
    color: var(--lv-text-gray);
    white-space: nowrap;
}

.lv_stage .now_temp .deg .deg-mark {
    position: absolute;
    right: -25px;
    top: 0;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 5px solid var(--lv-text-gray);
    border-radius: 50%;
    background-color: transparent;
    font-size: 0;
    color: transparent;
}

.lv_stage .now_temp .desc {
    width: 98px;
    margin-top: 3px;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.4px;
    text-align: center;
    color: var(--lv-text-gray);
}

.lv_stage .now_updown {
    position: absolute;
    left: 293px;
    top: 26px;
}

.lv_stage .now_updown .row {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 18px;
    font-size: 20px;
    font-weight: 700;
    color: var(--lv-text-gray);
    letter-spacing: -0.2px;
}

.lv_stage .arw_svg { flex: none; }
.lv_stage .row.up .arw_svg,
.lv_stage .arw_svg.up { color: var(--lv-point-red); }
.lv_stage .row.down .arw_svg,
.lv_stage .arw_svg.down { color: var(--lv-point-blue); }

.lv_stage .now_updown .divider {
    display: block;
    width: 47px;
    height: 2px;
    margin: 9px 0 9px;
    background: var(--lv-line);
}

/* 습도/강수량/바람 3열 */
.lv_stage .now_cols {
    position: absolute;
    left: 340px;
    top: 29px;
    display: flex;
    height: 86px;
}

.lv_stage .now_col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 94px;
    text-align: center;
}

.lv_stage .now_col + .now_col {
    border-left: 1px dashed #D9D9D9;
}

.lv_stage .now_col .label {
    font-size: 20px;
    letter-spacing: -0.4px;
    color: var(--lv-text-gray);
}

.lv_stage .now_col .icn {
    display: block;
    margin: auto 0;
    object-fit: contain;
}

.lv_stage .now_col .icn.hum { width: 31px; height: 36px; }
.lv_stage .now_col .icn.rain { width: 36px; height: 26px; }
.lv_stage .now_col .icn.wind { width: 26px; height: 36px; }

.lv_stage .now_col .val {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--lv-text-gray);
    white-space: nowrap;
}

/* 일별 예보 카드 */
.lv_stage .forecast {
    position: absolute;
    left: 12px;
    top: 145px;
    display: flex;
    gap: 13px;
}

.lv_stage .fc_card {
    position: relative;
    width: 92px;
    height: 116px;
    background: var(--lv-card);
    border-radius: var(--lv-radius-card);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.05), 2px 3px 5px rgba(0, 0, 0, 0.14);
}

.lv_stage .fc_card .d,
.lv_stage .fc_card .w {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
}

.lv_stage .fc_card .d {
    top: 3px;
    font-size: 17px;
    line-height: 17px;
    letter-spacing: 0.2px;
    color: var(--lv-text-light);
}

.lv_stage .fc_card .w {
    top: 21px;
    font-size: 15px;
    line-height: 15px;
    font-weight: 700;
    color: var(--lv-text-gray);
}

.lv_stage .fc_card img {
    position: absolute;
    left: 50%;
    top: 35px;
    width: 60px;
    height: 54px;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center;
}

.lv_stage .fc_card .t {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 15px;
    font-weight: 700;
    color: var(--lv-text-gray);
    white-space: nowrap;
}

.lv_stage .fc_card .t .gap { width: 4px; }

.lv_stage .weather_empty {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 20px;
    color: var(--lv-text-light);
}

.lv_stage .forecast_empty {
    position: absolute;
    left: 0;
    right: 0;
    top: 145px;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--lv-text-light);
}

/* ===== 우측: 실시간 라이브 영상 그리드 ===== */
.lv_stage .cctv_grid {
    position: absolute;
    left: 724px;
    top: 88px;
    display: grid;
    grid-template-columns: 565px 566px;
    grid-template-rows: 306px 306px 304px;
    gap: 20px;
}

.lv_stage .tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--lv-radius-tile);
    background: #000;
    cursor: pointer;
    transition: box-shadow .24s ease;
}

.lv_stage .tile .tile_body {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.lv_stage .tile .live_player {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.lv_stage .tile .live_player video,
.lv_stage .tile .live_player canvas,
.lv_stage .tile .live_player img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    vertical-align: top;
}

/* 재연결 대기 슬롯 — 디코딩은 진행하되 화면에는 노출하지 않는다.
   끊김 시 활성 슬롯의 마지막 프레임을 유지한 채 새 스트림을 뒤에서 준비한다. */
.lv_stage .tile .live_player.standby {
    opacity: 0;
    pointer-events: none;
}

.lv_stage .tile.selected {
    box-shadow: 0 0 0 3px var(--lv-point-blue), 0 0 22px rgba(129, 163, 255, .42);
}

.lv_stage .tile.selected::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(129, 163, 255, .18), transparent 38%);
    pointer-events: none;
}

.lv_stage .tile_shade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

.lv_stage .tile_name {
    position: absolute;
    left: 23px;
    bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
    z-index: 2;
}

.lv_stage .tile_full {
    position: absolute;
    right: 27px;
    bottom: 21px;
    width: 24px;
    height: 24px;
    color: #fff;
    z-index: 2;
}

.lv_stage .tile_full svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* 화면 조정 중 타일 */
.lv_stage .tile .no_signal_msg {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    letter-spacing: -0.3px;
    color: #fff;
    background: #000;
    z-index: 1;
}

.lv_stage .tile.no_signal .no_signal_msg {
    display: flex;
}

/* 타일 전체화면 확대 (stage 기준) */
.lv_stage .tile .btn_close_full {
    display: none;
    position: absolute;
    right: 18px;
    top: 12px;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
    z-index: 3;
}

.lv_stage .tile.expanded .tile_body {
    position: fixed;
    z-index: 300;
    background: #000;
}

.lv_stage .tile.expanded .live_player video,
.lv_stage .tile.expanded .live_player canvas,
.lv_stage .tile.expanded .live_player img {
    object-fit: contain;
}

.lv_stage .tile.expanded .btn_close_full { display: flex; }
.lv_stage .tile.expanded .tile_full { display: none; }
.lv_stage .tile.expanded .tile_shade { display: none; }

/* ===== 지도 CCTV 마커 (ol.Overlay) ===== */
.lv_marker {
    position: relative;
    width: 38px;
    height: 45px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.lv_marker .pin {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    color: #9aa0ab;
}

.lv_marker .pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top: 8px solid #fff;
    border-bottom: 0;
}

.lv_marker .pin svg {
    width: 19px;
    height: 19px;
}

.lv_marker .marker_label {
    display: none;
    position: absolute;
    left: 26px;
    top: -38px;
    height: 38px;
    padding: 0 17px 0 13px;
    align-items: center;
    gap: 7px;
    border-radius: 20px;
    background-color: var(--lv-point-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    white-space: nowrap;
}

.lv_marker .marker_label svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.lv_marker.active { z-index: 3; }

.lv_marker.active .pin {
    background-color: var(--lv-point-blue);
    color: #fff;
}

.lv_marker.active .pin::before {
    content: "";
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(129, 163, 255, .7);
    border-radius: 50%;
    animation: lvMarkerPulse 1.8s ease-out infinite;
    pointer-events: none;
}

.lv_marker.active .pin::after {
    border-top-color: var(--lv-point-blue);
}

.lv_marker.active .marker_label {
    display: flex;
}

.lv_marker.label_left .marker_label {
    left: auto;
    right: 26px;
}

@keyframes lvMarkerPulse {
    0%, 100% { transform: scale(.82); opacity: .35; }
    50% { transform: scale(1.08); opacity: .95; }
}

@media (prefers-reduced-motion: reduce) {
    .lv_stage .tile,
    .lv_stage .tile.selected::before,
    .lv_marker.active .pin::before {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== 대민 PC 반응형 레이아웃 =====
 * 고정 1920×1080 캔버스를 확대하지 않고 viewport에 맞춰 배치한다.
 * 가로·세로가 다른 화면에서도 콘텐츠를 자르거나 찌그러뜨리지 않도록
 * 주요 카드와 CCTV 그리드만 유동 단위로 계산한다.
 */
.lv_stage {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
    transform-origin: initial;
}

.lv_stage .top {
    left: 2.19%;
    top: 2%;
    transform: none;
    gap: clamp(5px, min(0.42vw, 0.74vh), 8px);
}

.lv_stage .top img {
    width: clamp(32px, min(2.35vw, 4.17vh), 45px);
    height: clamp(32px, min(2.35vw, 4.17vh), 45px);
}

.lv_stage .top h1 {
    font-size: clamp(26px, min(1.77vw, 3.15vh), 34px);
    font-family: PretendardSemiBold, "Pretendard", sans-serif;
    color: #2B3C98;
    letter-spacing: -0.57px;
}

.lv_stage .sec_label.right {
    position: absolute;
    right: 2.4%;
    top: 4.2%;
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.4vw, 8px);
}

.lv_stage .sec_label.right .cctvImg {
    width: clamp(20px, 1.4vw, 27px);
    height: clamp(15px, 1.05vw, 20px);
}

.lv_stage .sec_label.right .cctvTitle {
    font-size: clamp(16px, min(1.1vw, 1.94vh), 21px);
    font-family: PretendardSemiBold, "Pretendard", sans-serif;
    font-weight: 600;
}

.lv_stage .map_card {
    left: 2.19%;
    top: 8.15%;
    width: 33.54%;
    height: 58.52%;
}

.lv_stage .map_type {
    top: 2.2%;
    right: 2.2%;
}

.lv_stage .map_type button {
    min-width: clamp(42px, 2.8vw, 54px);
    height: clamp(25px, 2.96vh, 32px);
    padding: 0 clamp(7px, 0.52vw, 10px);
    font-size: clamp(12px, min(0.78vw, 1.39vh), 15px);
}

.lv_stage .weather_head {
    left: 2.19%;
    top: 68.0%;
    width: 33.54%;
    height: clamp(26px, 2.96vh, 32px);
    align-items: flex-end;
    padding-bottom: clamp(1px, 0.19vh, 2px);
}

.lv_stage .weather_head .sec_title {
    margin-left: 1.24%;
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.4vw, 8px);
}

.lv_stage .weather_head .sec_title .weatherImg {
    width: clamp(18px, 1.25vw, 24px);
    height: clamp(18px, 1.25vw, 24px);
}

.lv_stage .weather_head .sec_title .cctvTitle {
    font-size: clamp(16px, min(1.1vw, 1.94vh), 21px);
    font-family: PretendardSemiBold, "Pretendard", sans-serif;
    font-weight: 600;
    line-height: 1;
}

.lv_stage .weather_head .weather_stamp {
    margin-left: 1.24%;
    padding: 2px clamp(6px, 0.52vw, 10px);
    font-size: clamp(11px, min(0.78vw, 1.39vh), 15px);
}

.lv_stage .weather_head .date {
    margin: 0 1.24% 1px 0;
    font-size: clamp(12px, min(0.83vw, 1.48vh), 16px);
    line-height: 1;
}

.lv_stage .weather_card {
    left: 2.19%;
    top: 72.0%;
    width: 33.54%;
    height: 24.81%;
}

.lv_stage .now_icon {
    left: 5%;
    top: 8%;
    width: 20%;
    height: 35%;
    object-fit: contain;
}

.lv_stage .now_temp {
    left: 25.3%;
    top: 8%;
}

.lv_stage .now_temp .deg {
    font-size: clamp(46px, min(4.38vw, 7.78vh), 84px);
}

.lv_stage .now_temp .desc {
    width: 100%;
    font-size: clamp(13px, min(0.99vw, 1.76vh), 19px);
}

/* left는 45.5% 유지 — 더 왼쪽으로 옮기면 .now_temp의 도(°) 기호(.deg-mark, right:-25px)와
   최고기온 화살표가 좁은 화면에서 맞닿는다. gap은 .now_cols를 오른쪽으로 밀어서 확보한다. */
.lv_stage .now_updown {
    left: 45.5%;
    top: 10%;
}

/* 기본 블록의 divider 고정 폭(47px)을 해제한다.
   비율 레이아웃에 px 고정값이 남으면 카드가 좁아질 때 우측 3열(습도/강수량/바람)을 침범한다.
   .now_updown은 절대배치 + width:auto(shrink-to-fit)이라
   자식의 width:100%는 rows(텍스트) 폭에 맞춰진다. (2026-07-27 정연재) */
.lv_stage .now_updown .divider {
    width: 100%;
}

.lv_stage .now_updown .row {
    height: auto;
    font-size: clamp(14px, min(1.04vw, 1.85vh), 20px);
    white-space: nowrap;
}

/* gap = 56% − 45.5% = 카드폭의 10.5%. 우측 끝(56 + 40.8 = 96.8%)은 현행 유지. */
.lv_stage .now_cols {
    left: 56%;
    top: 11%;
    width: 40.8%;
    height: 32%;
}

.lv_stage .now_col {
    width: 33.33%;
}

.lv_stage .now_col .label,
.lv_stage .now_col .val {
    font-size: clamp(14px, min(1.04vw, 1.85vh), 20px);
}

.lv_stage .forecast {
    left: 2%;
    top: 54%;
    width: 96%;
    height: 43%;
    gap: 2%;
}

.lv_stage .fc_card {
    width: auto;
    height: 100%;
    flex: 1 1 0;
}

.lv_stage .fc_card .d {
    font-size: clamp(12px, min(0.89vw, 1.57vh), 17px);
}

.lv_stage .fc_card .w {
    font-size: clamp(11px, min(0.78vw, 1.39vh), 15px);
}

.lv_stage .fc_card .t {
    font-size: clamp(11px, min(0.78vw, 1.39vh), 15px);
}

.lv_stage .fc_card img {
    width: 65%;
    height: 47%;
}

.lv_stage .cctv_grid {
    left: 37.71%;
    top: 8.15%;
    width: 59.95%;
    height: 88.52%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    column-gap: 1.74%;
    row-gap: 1.85%;
}
