:root {
  --bg: #e8eef5;
  --ink: #1c2430;
  --muted: #5d6b7c;
  --housing: #222831;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
}

.wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  text-align: center;
}

.back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pole {
  position: absolute;
  top: 100%;
  width: 18px;
  height: 90px;
  background: #8b93a0;
  border-radius: 0 0 6px 6px;
}

.housing {
  width: 110px;
  padding: 1rem 0.85rem;
  background: var(--housing);
  border-radius: 28px;
  display: grid;
  gap: 0.75rem;
  box-shadow: 0 16px 30px rgba(28, 36, 48, 0.2);
}

.light {
  width: 70px;
  height: 70px;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.28;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.light.red {
  background: #e63946;
}

.light.yellow {
  background: #f4d35e;
}

.light.green {
  background: #2a9d8f;
}

.light.on {
  opacity: 1;
  box-shadow: 0 0 24px currentColor;
  transform: scale(1.04);
}

.light.red.on {
  box-shadow: 0 0 28px rgba(230, 57, 70, 0.8);
}

.light.yellow.on {
  box-shadow: 0 0 28px rgba(244, 211, 94, 0.85);
}

.light.green.on {
  box-shadow: 0 0 28px rgba(42, 157, 143, 0.8);
}

.controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.controls button,
#start,
#stop {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}

.controls .ghost,
#stop {
  background: transparent;
  color: var(--ink);
  border: 1px solid #c3cedb;
}

.status {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
