* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f7fa; --card: #fff; --ink: #1f2933; --muted: #6b7280;
  --line: #e5e7eb; --accent: #e74c3c; --pos: #2e7d32; --neg: #1565c0;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }
#app { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 30px; }
.topbar h1 { font-size: 20px; font-weight: 700; }
.subtitle { font-size: 12px; color: var(--muted); }
.badge { font-size: 12px; color: #b71c1c; background: #ffebee; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.loading { padding: 80px; text-align: center; color: var(--muted); }
.content { padding: 24px; max-width: 1100px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.card h3 { font-size: 15px; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; margin-bottom: 4px; }
.field .val { font-size: 13px; color: var(--accent); font-weight: 600; margin-left: 8px; }
.field input[type=range] { width: 100%; }
.field select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.predict-btn { margin-top: 8px; width: 100%; padding: 11px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.predict-btn:hover { opacity: 0.92; }
.result-card { display: flex; flex-direction: column; }
.placeholder { color: var(--muted); text-align: center; padding: 40px 0; }
.prob { font-size: 52px; font-weight: 800; color: var(--accent); text-align: center; }
.prob-label { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.band { text-align: center; padding: 8px; border-radius: 8px; font-weight: 600; margin-bottom: 8px; }
.band.low { background: #e8f5e9; color: var(--pos); }
.band.mid { background: #fff8e1; color: #f57f17; }
.band.high { background: #fdecea; color: var(--accent); }
.advice { font-size: 13px; color: var(--ink); margin-bottom: 14px; line-height: 1.5; }
.plot { width: 100%; height: 300px; }
.disclaimer { font-size: 11px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
