
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #101116;
  color: #f8fafc;
  font-family: Arial, Helvetica, sans-serif;
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 28px;
}

h1 {
  margin: 0 0 12px;
  font-size: 27px;
  font-weight: 700;
}

#instruction {
  color: #d6e4ff;
  font-size: 18px;
  line-height: 1.5;
  min-height: 52px;
  margin: 0 0 14px;
}

.stage {
  background: #08090e;
  border: 1px solid #30384b;
  border-radius: 17px;
  overflow: hidden;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

.bead {
  cursor: default;
}

.bead.selectable {
  cursor: pointer;
}

.bead.selected {
  stroke: #fef08a;
  stroke-width: 4;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

button {
  background: #203047;
  border: 1px solid #52647c;
  color: #ffffff;
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 16px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #2d4665;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

#introBtn,
#start {
  background: #11596a;
}

#status {
  min-height: 25px;
  color: #bfe2ff;
  font-size: 16px;
  margin: 16px 0;
}

.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #d6e4ff;
  font-size: 14px;
}

.dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  margin-right: 7px;
}

.red {
  background: #f1282e;
}

.green {
  background: #18a33c;
}

@media (max-width: 600px) {
  .app {
    padding: 16px 12px;
  }

  h1 {
    font-size: 22px;
  }

  #instruction {
    font-size: 15px;
  }

  button {
    font-size: 14px;
    padding: 10px 12px;
  }
}
