:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #0f0f0f;
  --muted: #666666;
  --border: #d8d8d8;
}

* {
  box-sizing: border-box;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
}

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: #000;
  color: #fff;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.12em;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.controls label {
  color: #dcdcdc;
}

.controls select,
.controls button {
  border: 1px solid #3a3a3a;
  background: #101010;
  color: #fff;
  height: 34px;
  border-radius: 4px;
  padding: 0 10px;
}

.controls button {
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: calc(100% - 64px);
}

#map {
  width: 100%;
  height: 100%;
}

.panel {
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}

.panel h1 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.status {
  color: var(--muted);
  margin-bottom: 14px;
}

.train-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.train-list li {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}

.train-route {
  font-weight: 600;
}

.train-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 280px;
  }

  .panel {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
