* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

body {
  background: #111;
  color: #fff;
}

.app {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4%;
}

.display {
  border: 3px solid #f33;
  border-radius: 12px;
  padding: 6%;
  font-size: 1.6rem;
  line-height: 1.4;
  min-height: 30%;
}

.buttons {
  display: flex;
  gap: 4%;
  justify-content: center;
  margin-top: 4%;
}

.buttons button {
  flex: 1;
  padding: 1em;
  font-size: 1.4rem;
  border-radius: 12px;
  border: none;
  background: #333;
  color: #fff;
}

.buttons button:active {
  background: #666;
}

.history {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 4%;
}

.reset {
  margin-top: 4%;
  padding: 0.8em;
  font-size: 1rem;
  background: #222;
  color: #aaa;
  border: none;
  border-radius: 8px;
}

.c-red { color: #ff4d4d; font-weight: 700; }
.c-yellow { color: #ffd43b; font-weight: 700; }
.c-blue { color: #4dabf7; font-weight: 700; }
.c-purple { color: #b197fc; font-weight: 700; }

.block {
  margin-bottom: 1em;
  line-height: 1.4;
}

.role-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6%;
  margin: 4% 0;
}

.role-label {
  font-size: 1.2em;
  font-weight: 700;
}

.switch {
  position: relative;
  width: 18%;
  height: 2.2em;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  display: flex;
  align-items: center;
  padding: 0.2em;
  background-color: #555;
  border-radius: 2em;
  transition: background-color 0.2s;
}

.slider:before {
  content: "";
  width: 1.7em;
  height: 1.7em;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

/* OFF（MT） */
.switch input + .slider {
  justify-content: flex-start;
}

/* ON（ST） */
.switch input:checked + .slider {
  justify-content: flex-end;
  background-color: #4dabf7;
}


.hidden {
  display: none;

}
