  body { font-family: sans-serif; margin:0; display:flex; flex-direction:column; align-items:center; background:#cce4ff; }
  h1 { margin:10px; }

  #main { display:flex; gap:20px; justify-content:center; align-items:flex-start; }
#toolbar {
  display: grid;
  grid-template-columns: repeat(5, 180px); /* 4 equal-width buttons per row */
  gap: 10px;
  margin-bottom: 10px;
  justify-content: center;
}

.tool {
  width: 150px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 2px solid #333;
  background: #eee;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
}

.tool.selected {
  background: #88c;
  color: white;
}

.tool:hover {
  background: #ddd;
  transform: translateY(-2px);
}
  .icon { width:20px; height:20px; }
  #grid { display:grid; gap:1px; background:#444; }

  .cell { width:32px; height:32px; background:#bfefbf; display:flex; align-items:center; justify-content:center; user-select:none; cursor:pointer; transition:outline 0.1s; }
  .cell:hover { outline:2px solid #222; }
  .cell img { width:24px; height:24px; pointer-events:none; }

  .side-panel { background:#fff; padding:10px 15px; border-radius:6px; box-shadow:0 0 8px rgba(0,0,0,0.2); width:210px; font-size:14px; }
  .stat-row { display:flex; align-items:center; gap:6px; margin-bottom:6px; }
  #controls { margin-top:10px; display:flex; gap:10px; justify-content:center; }
  button { padding:6px 12px; border:1px solid #333; background:#eee; border-radius:4px; cursor:pointer; }
  button:hover { background:#ddd; }
  .info-label { font-weight:bold; }
  input[type="file"] { display:none; }
  
.cell.highlight {
  outline: 2px solid #00ff00;
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  from { outline-color: #00ff00; }
  to { outline-color: #66ff66; }
}

.remove-toggle {
  flex: 1;
  padding: 6px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #ddd;
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.2s;
}
.remove-toggle.active {
  background: #5c9;
  color: white;
  border-color: #2a7;
}

.help-btn {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background 0.2s;
}
.help-btn:hover { background: #2563eb; }

.help-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  overflow-y: auto;
}
.help-content {
  background: white;
  margin: 60px auto;
  padding: 20px 30px;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.help-close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}
.help-close:hover { color: black; }

.help-table {
  border-collapse: collapse;
  width: 100%;
}

.help-table th, .help-table td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
  vertical-align: middle;
}

.icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}
