/* Hall display: dark coherent theme, Finnish labels. */
:root {
  --bg: #17181c;
  --panel: #20222a;
  --text: #e8e8ec;
  --muted: #9a9aa5;
  --accent: #ff8a3d;
  --green: #3fb950;
  --yellow: #e3b341;
  --orange: #ff8a3d;
  --red: #e5534b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Roboto", system-ui, sans-serif;
  font-size: clamp(14px, 1.4vw, 20px);
}
.topbar {
  display: flex; align-items: center; gap: 2.5rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid #2c2e36;
}
.clock { display: flex; flex-direction: column; line-height: 1.1; }
#clock-time { font-size: clamp(28px, 3.4vw, 52px); font-weight: 700; }
#clock-date { color: var(--muted); font-size: clamp(13px, 1.3vw, 18px); }
.top-metric { display: flex; flex-direction: column; align-items: flex-start; }
.top-metric .label { color: var(--muted); font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.06em; }
.top-metric .value { font-size: clamp(18px, 2vw, 30px); font-weight: 600; }
.grid {
  display: grid; gap: 0.8rem; padding: 0.8rem;
  grid-template-columns: 1.2fr 1.4fr 0.9fr;
  grid-template-rows: 2fr 1fr;
  height: calc(100% - 5.4rem);
}
.panel {
  background: var(--panel); border-radius: 14px; padding: 1rem 1.2rem;
  min-height: 0; overflow: hidden; position: relative;
}
.panel h2 { font-size: 1em; font-weight: 600; color: var(--muted); margin-bottom: 0.6rem; letter-spacing: 0.05em; }
.panel-prices { grid-row: 1; }
.panel-radar { grid-row: 1; grid-column: 2; }
.panel-house { grid-row: 1; grid-column: 3; }
.panel-bus { grid-column: 1 / span 2; grid-row: 2; }

.price-now { color: var(--accent); font-size: 1.5em; font-weight: 700; margin-left: 0.5rem; }
#price-chart { display: flex; align-items: flex-end; gap: 2px; height: 68%; }
#price-chart .bar { flex: 1 1 0; min-width: 2px; border-radius: 3px 3px 0 0; }
#price-chart .bar.current { outline: 2px solid var(--text); }
.bar.green { background: var(--green); }
.bar.yellow { background: var(--yellow); }
.bar.orange { background: var(--orange); }
.bar.red { background: var(--red); }
.legend-row { color: var(--muted); font-size: 0.75em; display: flex; gap: 0.9rem; align-items: center; margin-top: 0.6rem; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.orange { background: var(--orange); }
.dot.red { background: var(--red); }

#radar-img { width: 100%; height: 70%; object-fit: contain; display: block; }
.radar-hud { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.4rem; }
.radar-hud button {
  background: #2c2e36; color: var(--text); border: 0; border-radius: 8px;
  font-size: 1.2em; padding: 0.2rem 0.8rem; cursor: pointer; touch-action: manipulation;
}
#radar-source { color: var(--muted); font-size: 0.7em; }

.big-number { font-size: clamp(34px, 4.4vw, 74px); font-weight: 700; line-height: 1.05; }
.big-number.small { font-size: clamp(22px, 2.6vw, 42px); }
.label-sub { color: var(--muted); font-size: 0.8em; margin-bottom: 0.9rem; }

#bus-list { display: flex; flex-direction: column; gap: 0.3rem; }
.bus-row { display: flex; align-items: baseline; gap: 1.2rem; font-size: clamp(15px, 1.5vw, 24px); }
.bus-row .route { font-weight: 700; color: var(--accent); min-width: 3.4rem; }
.bus-row .time { margin-left: auto; color: var(--muted); }
.bus-row .eta { font-weight: 600; }
.bus-stop-name { color: var(--muted); font-size: 0.8em; margin-top: 0.4rem; }
.error-state, .no-key-state { color: var(--muted); font-style: italic; padding: 0.8rem 0; }
