:root{
  --primary:#2563eb; --primary-dark:#1d4ed8; --bg:#eef2f7; --card:#ffffff;
  --text:#1f2937; --sub:#6b7280; --border:#d7dde7; --shadow:0 10px 25px rgba(0,0,0,.08);
}
body.dark{ --bg:#101418; --card:#1b222b; --text:#f4f4f4; --sub:#c4c4c4; --border:#313945; }
*{ margin:0; padding:0; box-sizing:border-box; }
body{ font-family:"Noto Sans KR",Arial,sans-serif; background:var(--bg); color:var(--text); transition:.25s; }
.top-header{ display:flex; justify-content:space-between; align-items:center; padding:18px 24px; background:var(--card); box-shadow:var(--shadow); position:sticky; top:0; z-index:999; }
.top-header h1{ font-size:30px; } .top-header p{ margin-top:6px; color:var(--sub); }
.header-actions{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; } .header-actions button{ padding:10px 18px; }
.layout{ width:min(1700px,95%); margin:auto; padding:25px; }
.card{ background:var(--card); border-radius:14px; padding:22px; box-shadow:var(--shadow); margin-bottom:22px; }
.search-card{ display:grid; grid-template-columns:2fr 2fr 2fr auto; gap:15px; align-items:end; }
.form-group{ display:flex; flex-direction:column; } .form-group label{ margin-bottom:7px; font-weight:bold; }
input,select{ height:44px; border:1px solid var(--border); border-radius:8px; padding:0 12px; background:white; color:#111827; }
body.dark input, body.dark select{ background:#2b333d; color:white; }
button{ cursor:pointer; border:none; border-radius:8px; font-weight:bold; } button:disabled{ opacity:.65; cursor:not-allowed; }
.primary-btn{ background:var(--primary); color:white; height:44px; min-width:110px; } .primary-btn:hover{ background:var(--primary-dark); }
.sub-btn{ padding:10px 18px; background:#e5e7eb; color:#111827; }
.location-banner{ background:linear-gradient(135deg,#2563eb,#0f172a); color:white; border-radius:16px; padding:22px 26px; margin-bottom:22px; box-shadow:var(--shadow); }
.location-label{ display:block; font-size:13px; opacity:.8; margin-bottom:6px; }
.location-banner strong{ display:block; font-size:28px; letter-spacing:-.5px; }
.location-banner small{ display:block; margin-top:6px; opacity:.85; }
.summary-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:15px; margin-bottom:20px; }
.summary-card{ background:var(--card); border-radius:12px; padding:20px; text-align:center; box-shadow:var(--shadow); }
.summary-card span{ color:var(--sub); display:block; margin-bottom:10px; } .summary-card strong{ font-size:22px; }
.recommendation-card{ border-left:6px solid var(--primary); } .recommendation-card h2{ margin-bottom:10px; } .recommendation-card p{ line-height:1.8; font-size:17px; }
.map-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; } .map-box,.windy-frame{ width:100%; height:500px; border-radius:10px; overflow:hidden; } .windy-frame{ border:none; }
.section-title{ margin-bottom:15px; } .section-title h2{ margin-bottom:8px; } .section-title p{ color:var(--sub); }
.table-actions{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.risk-guide{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 14px; align-items:center; }
.risk-guide span{ font-weight:bold; color:var(--sub); margin-right:4px; } .risk-guide b{ padding:6px 10px; border-radius:999px; font-size:13px; }
.guide-green{ background:#dcfce7; color:#166534; } .guide-yellow{ background:#fef9c3; color:#854d0e; } .guide-orange{ background:#ffedd5; color:#9a3412; } .guide-red{ background:#fee2e2; color:#991b1b; }
.table-wrap{ overflow:auto; } table{ width:100%; border-collapse:collapse; min-width:1350px; } th{ background:#edf2f7; padding:12px; border-bottom:2px solid var(--border); } body.dark th{ background:#2b333d; } td{ padding:10px; text-align:center; border-bottom:1px solid var(--border); }
.date-cell{ font-weight:bold; background:#f8fafc; } body.dark .date-cell{ background:#242d36; }
.risk-badge{ display:inline-block; padding:5px 10px; border-radius:999px; font-weight:bold; font-size:13px; white-space:nowrap; }
.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; }
.agreement-high{ background:#dcfce7; color:#166534; } .agreement-mid{ background:#fef9c3; color:#854d0e; } .agreement-low{ background:#fee2e2; color:#991b1b; } .agreement-none{ background:#e5e7eb; color:#374151; }
.no-data{ color:#9ca3af; font-weight:bold; }
.rain-empty{ background:transparent; color:#9ca3af; font-weight:bold; }
.rain-zero{ background:transparent !important; color:var(--text) !important; }
.rain-lv1{ background:#eef9ff; color:#111827 !important; } .rain-lv2{ background:#d6f0ff; color:#111827 !important; } .rain-lv3{ background:#aee7ff; color:#111827 !important; } .rain-lv4{ background:#7dd3fc; color:#111827 !important; } .rain-lv5{ background:#38bdf8; color:#111827 !important; } .rain-lv6{ background:#0284c7; color:#fff !important; } .rain-lv7{ background:#075985; color:#fff !important; }
.probability-value{ display:inline-flex; flex-direction:column; gap:2px; font-weight:800; line-height:1.2; }
.probability-value small{ font-size:11px; font-weight:600; opacity:.8; }
.prob-lv1{ background:#f8fafc; color:#111827 !important; } .prob-lv2{ background:#ecfccb; color:#111827 !important; } .prob-lv3{ background:#fef9c3; color:#111827 !important; } .prob-lv4{ background:#fed7aa; color:#111827 !important; } .prob-lv5{ background:#fecaca; color:#111827 !important; }
body.dark .rain-lv1, body.dark .rain-lv2, body.dark .rain-lv3, body.dark .rain-lv4, body.dark .rain-lv5, body.dark .prob-lv1, body.dark .prob-lv2, body.dark .prob-lv3, body.dark .prob-lv4, body.dark .prob-lv5, body.dark .risk-green, body.dark .risk-yellow, body.dark .risk-orange, body.dark .risk-red, body.dark .agreement-high, body.dark .agreement-mid, body.dark .agreement-low{ color:#111827 !important; }
.brand-footer{ padding:30px; text-align:center; color:var(--sub); line-height:1.8; } .brand-footer strong{ display:block; font-size:22px; color:var(--primary); } .brand-footer span,.brand-footer em{ display:block; }
@media(max-width:1100px){ .search-card{ grid-template-columns:1fr; } .summary-grid{ grid-template-columns:1fr 1fr; } .map-grid{ grid-template-columns:1fr; } .top-header{ flex-direction:column; align-items:flex-start; gap:15px; } }
@media(max-width:700px){ .layout{ padding:14px; width:100%; } .summary-grid{ grid-template-columns:1fr; } .location-banner strong{ font-size:22px; } }
@media print{ .search-card,.header-actions button,.table-actions button,.map-grid{ display:none; } body{ background:white; } .card,.summary-card,.location-banner{ box-shadow:none; border:1px solid #ccc; } }
@media (max-width: 768px) {
  .layout {
    width: 100%;
    padding: 10px;
  }

  .top-header {
    position: static;
    padding: 14px;
  }

  .top-header h1 {
    font-size: 22px;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #currentTime {
    grid-column: 1 / -1;
    font-size: 13px;
  }

  .card,
  .summary-card,
  .location-banner {
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
  }

  .search-card,
  .summary-grid,
  .map-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .summary-card {
    text-align: left;
  }

  .summary-card strong {
    font-size: 18px;
  }

  .location-banner strong {
    font-size: 21px;
  }

  .map-box,
  .windy-frame {
    height: 320px;
  }

  .section-title {
    display: block;
  }

  .section-title h2 {
    font-size: 18px;
  }

  .section-title p {
    font-size: 13px;
  }

  .table-actions {
    display: block;
  }

  .table-actions div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .sub-btn {
    width: 100%;
    margin-left: 0;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 980px;
    font-size: 13px;
  }

  th,
  td {
    padding: 7px 6px;
    white-space: nowrap;
  }

  .risk-guide {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand-footer {
    padding: 18px;
    font-size: 13px;
  }
}
.chart-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-inner {
  min-width: 1100px;
  height: 420px;
}

#rainChart {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 768px) {
  .chart-inner {
    min-width: 1200px;
    height: 360px;
  }
}
.chart-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.chart-inner {
  min-width: 1200px;
  height: 420px;
}

#rainChart {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 768px) {
  .chart-inner {
    min-width: 1500px;
    height: 360px;
  }
}