html,
body {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family:'Malgun Gothic' !important;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    min-width: 0;
}

#load_time {
    text-align:center;
    height:220px;
    margin-top:50px;
}

#load_time .time {
    font-size: 80px;
    line-height:1;
    display: block;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#load_time .date {
    font-size: 24px;
    margin-top:10px;
    display: block;
}

.time.update {
    transform: translateY(-6px);
    opacity: 0;
}

#load_weather {
    margin:0 auto;
    width: 380px;
    height:150px;
    padding:8px;
    margin-top:10px;
}

#index_main {
    height:150px;
    vertical-align: middle;
    margin: 0;
    padding: 20px 0;
}

#load_forecast {
    margin:0 auto;
    width: 100%;
}

.weather_today {
    float: left;
    width:150px;
    height:150px;
    background-size: 150px 150px;
    margin-left: -2px;
}

.main {
    margin:0 auto;
    height:157px;
    width:360px;
    text-align:center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home_disp {
    display: flex;
    position: relative;
}

.home_disp ul {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size:20px;
}

.home_disp li {
    margin: 0;
    list-style:none;
    font-size:20px;
	width:95px;
    padding: 7px 0;
}

.home_disp::after {
    content: "";
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 50%;
    width: 1px;
    background: rgba(0,0,0,0.12);
}

.dust_disp {
    display: flex;
    position: relative;
}

.dust_disp ul {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size:20px;
}

.dust_disp li {
    margin: 0;
    list-style:none;
    font-size:20px;
    width:95px;
    padding: 7px 0;
}

.dust_disp::after {
    content: "";
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 50%;
    width: 1px;
    background: rgba(0,0,0,0.12);
}

.dust_disp::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: rgba(0,0,0,0.12);
}

.home_temp, .dust_temp {
    font-size:28px;
}

.sup {
    font-size: 0.8em;
    vertical-align: super;
    position: relative;
    top: 0.1em;
    font-weight: 400;
}

.weather-forecast {
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: max-content;
}

.forecast-item {
    flex: 1;
    background: #f7f9fc;
    border-radius: 10px;
    padding: 10px 5px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
}

.forecast-item .time {
    font-size: 18px;
    color: #000;
    margin-bottom: 4px;
}

.forecast-item .icon img {
    width:44px;
    height: 44px;
}

.forecast-item .temp {
    font-size: 16px;
    font-weight: 400;
    margin-top: 4px;
}

/* forecast = 슬라이드 창 */
.forecast {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    scroll-snap-type: x mandatory;
}

/* 가로로 길게 */
.weather-forecast {
    width: max-content;
}

/* 슬라이드 카드 */
.forecast-item {
    flex-shrink: 0;
    scroll-snap-align: start;
}

.forecast::-webkit-scrollbar {
    display: none;
}
.forecast {
    scrollbar-width: none;
}

@media (max-width: 768px) {
    .forecast {
        max-width: calc(54px * 6 + 8px * 5 + 16px);
        /* 아이템6 + gap5 + padding */
        margin: 0 auto;
    }

    .forecast-item {
        width: 45px;
        min-width: 45px;
    }
    .forecast-item .icon img {
        width:32px;
        height: 32px;
    }
}

.weather-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 10px;
    max-width: 360px;
    border-radius: 16px;
    background: #f7f9fc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-family: 'Pretendard', system-ui, sans-serif;
    transition:
    transform: translateY(6px);
    animation: weatherFadeIn 0.45s ease-out forwards;
}

@keyframes weatherFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-card.refresh {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0,0,0,.08);
}

.weather-icon {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.weather-icon img {
    width: 100%;
    height: 100%;
    opacity: 1;
    position: relative;
    z-index: 50;
    transform: scale(0.95);
    animation: iconIn 0.4s ease-out 0.15s forwards;
}

@keyframes iconIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.weather-info {
    flex: 1;
}

.weather-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-left:13px;
}

.weather-main .status {
    font-size: 22px;
    color: #111;
    font-weight: 500;;
    margin-left : 0px;
}

.weather-main .temp {
    font-size: 36px;
    font-weight: 500;
    color: #111;
}

.weather-sub {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    font-size: 18px;
    color: #111;
    font-weight: 400;
    text-align:center;
}

/* 좋음 */
.state_15 {
    background: #4caf50;
}

/* 보통 */
.state_35 {
    background: #2196f3;
}

/* 나쁨 */
.state_75 {
    background: #ff9800;
}

/* 매우 나쁨 */
.state_500 {
    background: #f44336;
}
.state_15 { box-shadow: 0 0 0 2px rgba(76,175,80,.15); }
.state_35 { box-shadow: 0 0 0 2px rgba(33,150,243,.15); }
.state_75 { box-shadow: 0 0 0 2px rgba(255,152,0,.15); }
.state_500{ box-shadow: 0 0 0 2px rgba(244,67,54,.15); }

/* 상태 공통 */
.dust_disp span[class^="state_"] {
    display: inline-block;
    padding: 1px 10px;
    font-size: 16px;
    border-radius: 20px;
    color: #fff;
}

#settingBtn {
    position: fixed;
    top: 12px;
    right: 12px;
    cursor: pointer;
    z-index: 9999;
}

#settingBtn img {
    width:30px;
}

#settingModal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:10000;
    display:none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.setting-header{
    font-size:22px;
    padding:14px 16px;
    border-bottom:1px solid #eee;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-weight:600;
    background:#efefef;
}

.setting-body{
    position:absolute;
    left:50%;
    bottom:0;
    transform:translateX(-50%) translateY(100%);
    width:92%;
    max-width:420px;
    height: 65vh;
    background:#fff;
    border-radius:20px 20px 0 0;
    box-shadow:0 -6px 24px rgba(0,0,0,.2);
    overflow:hidden;
    transition:transform .35s cubic-bezier(.25,.8,.25,1);
    display: flex;
    flex-direction: column;
}

/* 열릴 때 */
#settingModal.open .setting-body{
    transform:translateX(-50%) translateY(0);
}

.list{
    flex: 1;
    overflow-y: auto;
    list-style:none;
    margin:0;
    padding:0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.list::-webkit-scrollbar {
    display: none;
}

.list li{
    padding:16px;
    border-bottom:1px solid #f1f1f1;
    font-size:20px;
    touch-action: pan-y;
}

.list li:active{
    background:#f5f5f5;
}

.gps-btn {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    border: none;
    border-radius: 12px;
    background: #111;
    color: #fff;
    font-size: 15px;
}