:root{
    --bg:#f4f6f8;
    --card:#ffffff;
    --text:#222;
    --sub:#64748b;
    --border:#e5e7eb;
    --header:#1f2937;
    --headerText:#ffffff;
    --primary:#2563eb;
}

body.dark{
    --bg:#111827;
    --card:#1f2937;
    --text:#f3f4f6;
    --sub:#cbd5e1;
    --border:#374151;
    --header:#0f172a;
    --headerText:#ffffff;
    --primary:#3b82f6;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Arial,"Noto Sans KR",sans-serif;
    transition:.25s;
}

.app-header{

    background:var(--header);

    color:var(--headerText);

    padding:22px 28px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

}

.app-header h1{

    margin:0;

    font-size:28px;

}

.app-header p{

    margin-top:6px;

    color:#cbd5e1;

}

.header-actions{

    display:flex;

    align-items:center;

    gap:10px;

}

.header-btn{

    width:auto;

    padding:0 18px;

    height:42px;

    border-radius:8px;

    border:none;

    background:#334155;

    color:white;

    cursor:pointer;

}

.container{

    max-width:1500px;

    margin:auto;

    padding:20px;

}

.card,

.summary-card{

    background:var(--card);

    border-radius:14px;

    box-shadow:0 4px 14px rgba(0,0,0,.08);

    padding:18px;

    margin-bottom:18px;

}

.controls{

    display:grid;

    grid-template-columns:1fr 1fr 1.3fr auto;

    gap:14px;

    align-items:end;

}

.form-group label{

    display:block;

    margin-bottom:6px;

    font-weight:bold;

}

input,

select,

button{

    width:100%;

    height:42px;

    border-radius:8px;

    border:1px solid var(--border);

    padding:0 12px;

    background:var(--card);

    color:var(--text);

}

button{

    cursor:pointer;

}

.primary-btn{

    background:var(--primary);

    color:white;

    border:none;

}

.sub-btn{

    width:auto;

    margin-left:6px;

}

.summary-grid{

    display:grid;

    grid-template-columns:repeat(5,1fr);

    gap:15px;

}

.summary-card span{

    display:block;

    color:var(--sub);

    margin-bottom:8px;

}

.summary-card strong{

    font-size:20px;

}

.map-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:18px;

}

.select-map{

    width:100%;

    height:450px;

    border-radius:10px;

    overflow:hidden;

}

.windy-frame{

    width:100%;

    height:450px;

    border:none;

    border-radius:10px;

}

.section-title{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:14px;

}

.section-help{

    font-size:13px;

    color:var(--sub);

}

.table-wrap{

    overflow:auto;

}

table{

    width:100%;

    min-width:1050px;

    border-collapse:collapse;

}

th,

td{

    border-bottom:1px solid var(--border);

    padding:10px;

    text-align:center;

}

th{

    background:#f8fafc;

}

body.dark th{

    background:#273549;

}

.model-name{

    display:block;

    font-weight:bold;

}

.model-desc{

    display:block;

    margin-top:4px;

    font-size:12px;

    color:var(--sub);

}

.date-merged{

    font-weight:bold;

    background:#f8fafc;

}

body.dark .date-merged{

    background:#273549;

}

.risk-badge{

    display:inline-block;

    padding:5px 10px;

    border-radius:999px;

    font-size:13px;

    font-weight:bold;

}

.risk-green{

    background:#dcfce7;

    color:#166534;

}

.risk-yellow{

    background:#fef9c3;

    color:#854d0e;

}

.risk-orange{

    background:#ffedd5;

    color:#9a3412;

}

.risk-red{

    background:#fee2e2;

    color:#991b1b;

}

.risk-none{

    background:#e5e7eb;

    color:#374151;

}

.no-data{

    color:#9ca3af;

    font-weight:bold;

}

/* 강수 음영 */

.rain-zero{

    background:transparent;

}

.rain-lv1{

    background:#eef9ff;

}

.rain-lv2{

    background:#d6f0ff;

}

.rain-lv3{

    background:#b8e6ff;

}

.rain-lv4{

    background:#7dd3fc;

}

.rain-lv5{

    background:#38bdf8;

}

.rain-lv6{

    background:#0284c7;

    color:white;

}

.rain-lv7{

    background:#075985;

    color:white;

}

@media(max-width:1100px){

.map-grid{

grid-template-columns:1fr;

}

.summary-grid{

grid-template-columns:repeat(2,1fr);

}

.controls{

grid-template-columns:1fr;

}

}

@media(max-width:700px){

.summary-grid{

grid-template-columns:1fr;

}

}

@media print{

.controls,

.header-btn,

.table-actions button{

display:none;

}

body{

background:white;

}

.card,

.summary-card{

box-shadow:none;

border:1px solid #ccc;

}

}