:root {
  --bg: #0c1015;
  --bg2: #141a22;
  --card: #161d27;
  --line: #232c38;
  --txt: #e8edf3;
  --muted: #8a97a6;
  --ost: #43aa8b;
  --sued: #f9c80e;
  --west: #f86624;
  --nord: #6c8ebf;
  --sun: #ffd23f;
  --accent: #2dd4bf;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 920px; margin: 0 auto; padding: 14px 14px calc(28px + env(safe-area-inset-bottom)); }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px 14px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: .2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #555; box-shadow: 0 0 0 0 rgba(45,212,191,.5); }
.dot.on { background: var(--accent); animation: pulse 2.4s infinite; }
.dot.off { background: var(--west); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,.5);} 70%{ box-shadow: 0 0 0 7px rgba(45,212,191,0);} 100%{box-shadow:0 0 0 0 rgba(45,212,191,0);} }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 12px; }
.hero-now, .sun-now { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.hero-label, .sun-row { color: var(--muted); font-size: 13px; }
.hero-power { font-size: 44px; font-weight: 700; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero-power .unit { font-size: 18px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.hero-sub { color: var(--muted); font-size: 13px; margin-top: 6px; }
.sun-now { display: flex; flex-direction: column; justify-content: center; }
.sun-row { display: flex; align-items: center; gap: 8px; color: var(--txt); font-weight: 600; }
.sun-row i { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 10px 2px rgba(255,210,63,.55); display: inline-block; }
.sun-meta { color: var(--muted); font-size: 13px; margin-top: 5px; font-variant-numeric: tabular-nums; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.card-head .peak { color: var(--muted); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }

.compass-card { display: grid; grid-template-columns: 240px 1fr; gap: 10px; align-items: center; }
#compass { width: 100%; max-width: 240px; }
.strings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.str { background: var(--bg2); border-radius: 12px; padding: 9px 11px; border-left: 3px solid var(--line); }
.str b { font-size: 13px; }
.str .p { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.str .d { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.str.ost { border-left-color: var(--ost); } .str.sued { border-left-color: var(--sued); }
.str.west { border-left-color: var(--west); } .str.nord { border-left-color: var(--nord); }

.ranges { display: flex; gap: 8px; margin: 4px 0 12px; }
.ranges button { flex: 1; padding: 9px 0; background: var(--card); color: var(--muted);
  border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ranges button.active { background: var(--accent); color: #06251f; border-color: var(--accent); }

.chart { width: 100%; height: 280px; }
.chart.energy { height: 220px; }
.foot { color: var(--muted); font-size: 11px; text-align: center; padding: 6px 0 2px; }

@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr; }
  .compass-card { grid-template-columns: 1fr; justify-items: center; }
  .strings { width: 100%; }
  .hero-power { font-size: 38px; }
}
