:root {
  --bg: #0f1b2e;
  --panel: #17243b;
  --panel-2: #1d2c47;
  --text: #eaf2ff;
  --muted: #9bb0d2;
  --accent: #3ea0ff;
  --warn: #ffb84d;
  --ok: #6dd58c;
  --danger: #ff6b6b;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 64px;
  display: flex; flex-direction: column; gap: 16px;
}

.hero {
  background: linear-gradient(160deg, #2a4d8a, #17243b 80%);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.hero-icon { font-size: 56px; line-height: 1; }
.hero-title { font-size: 22px; margin: 8px 0 4px; font-weight: 700; }
.hero-sub { color: var(--muted); margin: 0; font-size: 14px; }
.hero-meta { margin-top: 12px; color: var(--muted); font-size: 12px; }
.hero-meta .dot { margin: 0 6px; opacity: .5; }

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.card-title { font-weight: 700; margin-bottom: 12px; }

.hour-list { display: flex; flex-direction: column; gap: 6px; }
.hour-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border-radius: 10px;
}
.hour-row .hh { color: var(--muted); font-variant-numeric: tabular-nums; }
.hour-row .bar { height: 8px; background: #28395a; border-radius: 999px; overflow: hidden; }
.hour-row .bar > i {
  display: block; height: 100%; background: var(--accent);
}
.hour-row .pop { width: 48px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 12px; text-align: center; font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { color: var(--muted); font-size: 13px; }
.field small { opacity: .7; }
.field input, .field select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #2a3a5c;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }

.row { display: flex; gap: 8px; align-items: center; }
.row > input, .row > select { flex: 1; min-width: 0; }
.row .sep { color: var(--muted); }
.row.actions { margin-top: 8px; flex-wrap: wrap; }

button {
  border: 0; border-radius: 10px; padding: 10px 14px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
button.primary { background: var(--accent); color: #07182f; }
button.primary.outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.ghost { background: transparent; color: var(--text); border: 1px solid #2a3a5c; }
button:disabled { opacity: .55; cursor: not-allowed; }

.status { margin-top: 10px; min-height: 1.2em; font-size: 13px; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.err { color: var(--danger); }

.foot { text-align: center; color: var(--muted); font-size: 11px; opacity: .7; }

/* 공유받은 안내 카드 (URL parameter로 전달된 정보 표시) */
.shared-card {
  background: linear-gradient(135deg, #2b4d8a, #1a2f55);
  border: 1px solid #3ea0ff44;
}
.shared-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.shared-desc { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* 외출 시간대 리스트 */
.windows-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.window-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 6px;
}
.time-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
}
.time-row input[type="time"] {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #2a3a5c;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 15px;
}
.window-row select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #2a3a5c;
  border-radius: 8px;
  padding: 8px 10px;
}
.window-row .sep { color: var(--muted); }
.window-row .remove {
  background: transparent; color: var(--danger); border: 1px solid #3a2a3a;
  padding: 6px 10px; border-radius: 8px; font-size: 13px;
}
button.small { padding: 6px 10px; font-size: 13px; }

/* 미세먼지 카드 */
.air-body { display: flex; flex-direction: column; gap: 10px; }
.air-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--panel-2);
  border-radius: 10px;
}
.air-row .name { color: var(--muted); font-size: 13px; }
.air-row .val  { font-weight: 700; font-variant-numeric: tabular-nums; }
.air-row .badge {
  font-size: 12px; padding: 3px 8px; border-radius: 999px;
  color: #07182f; font-weight: 700;
}
.air-advice {
  padding: 10px 12px;
  border-radius: 10px;
  background: #1c2c4a;
  color: var(--text);
  font-weight: 600;
}
.muted-small { color: var(--muted); font-size: 12px; margin: 0 0 8px; }

/* hero level variants */
.hero.level-must     { background: linear-gradient(160deg, #1e4d8a, #0c2b56 80%); }
.hero.level-recommend{ background: linear-gradient(160deg, #8a5a1e, #3a2510 80%); }
.hero.level-notice   { background: linear-gradient(160deg, #2a4d8a, #17243b 80%); }
