:root {
  --fg: #e8eaf5; --muted: #9096b0; --line: rgba(255,255,255,.1);
  --accent: #8b5cf6; --accent-2: #22d3ee; --accent-3: #f472b6;
  --bg: #0b0e17; --warn: #fbbf24;
  --glass: rgba(255,255,255,.05); --glass-strong: rgba(255,255,255,.09);
}
* { box-sizing: border-box; }
body { margin: 0; padding: 0 16px 48px; font: 14px/1.6 system-ui, -apple-system, sans-serif;
       color: var(--fg); background: var(--bg); max-width: 1000px; margin-inline: auto;
       position: relative; }
/* 오로라 블롭: 고정 배경, 스크롤에 안 딸려온다 */
body::before {
  content: ''; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 32% at 18% 15%, rgba(139,92,246,.35), transparent 70%),
    radial-gradient(32% 28% at 85% 10%, rgba(34,211,238,.28), transparent 70%),
    radial-gradient(42% 38% at 50% 95%, rgba(244,114,182,.20), transparent 70%);
  filter: blur(70px);
  animation: drift 30s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 3%) scale(1.06); }
}
.brand { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; }
.app-icon { flex: 0 0 auto; }
h1 { font-size: 20px; margin: 0;
     background: linear-gradient(90deg, var(--fg), var(--accent-2));
     -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
h2 { font-size: 16px; margin: 28px 0 8px; color: var(--fg); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line);
        overflow-x: auto; }
.tabs.sub { border-bottom: none; margin-top: 2px; }
.tab { padding: 10px 16px; border: 0; background: none; cursor: pointer;
       font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent;
       white-space: nowrap; flex: 0 0 auto; transition: color .15s; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); border-bottom-color: var(--accent-2); font-weight: 600; }
#month-picker { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; align-items: center; }
#month-picker select { font: inherit; padding: 5px 8px; border: 1px solid var(--line);
                        border-radius: 6px; background: var(--glass); color: inherit; }
.pill { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
        background: var(--glass); color: var(--fg); cursor: pointer; font-size: 13px;
        transition: border-color .15s, box-shadow .15s; }
.pill:hover { border-color: var(--accent-2); }
.pill.active { background: linear-gradient(90deg, var(--accent), var(--accent-2));
               color: #fff; border-color: transparent;
               box-shadow: 0 0 16px rgba(139,92,246,.45); }
.pill:disabled { opacity: .35; cursor: default; }
.own-header { display: flex; flex-wrap: wrap; justify-content: space-between;
              align-items: center; gap: 8px 12px; margin: 20px 0 4px; }
.own-header h2 { margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 8px 0; }
.controls select { font: inherit; padding: 2px 4px; background: var(--glass); color: inherit;
                    border: 1px solid var(--line); border-radius: 4px; }
.note { color: var(--warn); font-size: 12px; min-height: 1.2em; margin: 4px 0; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 12px;
        background: var(--glass); backdrop-filter: blur(16px);
        box-shadow: 0 8px 30px rgba(0,0,0,.25); transition: border-color .15s; }
.card:hover { border-color: var(--accent-2); }
.card .label { color: var(--muted); font-size: 12px; }
.card .value { font-size: 20px; font-weight: 600; margin-top: 4px; color: var(--fg); }
table { border-collapse: collapse; width: 100%; margin: 12px 0; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: right; color: var(--fg); }
th:first-child, td:first-child { text-align: left; }
.muted { color: var(--muted); }
.desc { font-size: 11px; font-weight: 400; }
.total-row td { font-weight: 700; background: var(--glass-strong); }
.news-card { padding: 16px 18px; }
.news-summary { margin: 0; line-height: 1.7; }
.news-tag { display: inline-block; margin: 0 8px 2px 0; padding: 2px 8px; border-radius: 999px;
            background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff;
            font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 2px; }
.news-sources { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.news-source { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
               gap: 4px 12px; padding: 7px 0; }
.news-source + .news-source { border-top: 1px solid var(--line); }
.news-source a { color: var(--fg); text-decoration: none; font-size: 13px; }
.news-source a:hover { color: var(--accent-2); text-decoration: underline; }
.news-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.news-generated { color: var(--muted); font-size: 11px; margin: 12px 0 0; text-align: right; }
.weather-card { padding: 16px 18px; }
.weather-summary { margin: 0; font-size: 16px; font-weight: 600; }
.weather-updated { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line);
                    color: var(--muted); font-size: 11px; display: grid; gap: 4px; }
.disclaimer { color: var(--muted); font-size: 12px; border-top: 1px solid var(--line);
              padding-top: 12px; margin-top: 32px; }
canvas { max-width: 100%; }
@media (max-width: 600px) {
  /* 열이 많은 표(단지 선택 등)는 줄바꿈 대신 가로 스크롤로 보여준다 */
  table { font-size: 13px; display: block; overflow-x: auto; white-space: nowrap; }
  .controls { gap: 6px; }
}
