.mel-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

.mel-board {
  position: relative;
  display: grid;
  gap: 2px;
  background: var(--border);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  width: min(94vw, 520px);
  aspect-ratio: 1 / 1;
  user-select: none;
  touch-action: none;
}

/* Petit trait tracé pendant la sélection à la souris/au doigt, entre la
   case de départ et la case survolée. Purement visuel : il disparaît au
   relâchement (voir hideDragLine dans ui.js), la case "trouvée" reste
   marquée par .mel-cell.found. */
.mel-line-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mel-line-overlay line {
  stroke: var(--ink);
  stroke-linecap: round;
  opacity: 0;
}

.mel-cell {
  background: var(--cell-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.7rem, 2.6vw, 1rem);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.mel-cell.selecting {
  background: color-mix(in srgb, var(--accent) 35%, var(--cell-bg));
}
.mel-cell.found {
  background: var(--success-bg);
  color: var(--success);
}

.mel-words {
  min-width: 200px;
}
.mel-words h2 {
  font-family: var(--font-main);
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.mel-words ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mel-words li {
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.mel-words li.found {
  text-decoration: line-through;
  color: var(--text-muted);
  background: var(--success-bg);
  border-color: var(--success);
}
